Deep Learning Gently

Preface

In recent years, there’s been a resurgence in the field of Artificial Intelligence. It has spread beyond the academic world with major players like Google, Microsoft, and Facebook creating their own research teams and making some impressive acquisitions.

Some of this can be attributed to the abundance of raw data generated by social networks, much of which needs to be analyzed, as well as to the cheap computational power available either via CPUs or GPGPU as well as cheap storage.

But beyond these phenomena, this resurgence has been powered in no small part by a new trend in AI, specifically in machine learning, known as “Deep Learning”. Lets talk about the key concepts and methods behind deep learning, beginning with the simplest unit of composition and building to the concepts of deep learning in Java.

Rather than treating this as an academic exercise, we will explore this exciting space this using an application as our basis for learning.

What this book covers

Chapter 1, Introducing our Deep Learning Application, This chapter introduces our application.

Chapter 2, Understanding Deep Learning, ensures that your application is aligned with the platform features and uses them whenever possible, which is great for productivity when building your application, but perhaps more importantly, it ensures whether your customers are also able to extend and integrate with your application further.

Chapter 3, Designing Deep Learning Services, focuses on understanding the real heart of your application: how to design it, make it durable, and future proofing around a rapidly evolving platform using Micro-Services patterns as a template.

Chapter 4, Covers downloading and installing application

Chapter 5, Storing Models, teaches you how to model your application's data to make effective use of storage space, which can make a big difference to your customer's ongoing costs and initial decision-making when choosing your application.

Chapter 6, Executing your Deep Learning Application, explains how the platform handles requests and at what point Application code is invoked. This is important to understand how to design your code for maximum reuse and durability.

Chapter 7, Understanding the Domain Layer, aligns application code into classes more aligned with the functional purpose and behavior of your domain objects, to increase reuse and streamline code.

Chapter 8, Understanding the Selector Layer, leverages SQL to make the most out of the query engine, which can make queries complex. Using Martin Fowler's Mapping pattern as a template, this chapter illustrates a means to encapsulate queries, making them more accessible and reusable, and their results more predictable and robust across your code base.

Chapter 9, Designing User Interface, covers the concerns of an enterprise application user interface with respect to translation, localization, and customization, as well as the pros and cons of the various UI options available in the platform.

Chapter 10, Providing Integration and Extensibility, explains that enterprise-scale applications require you to carefully consider integration with existing applications and business needs while looking into the future, by designing the application with extensibility in mind.

Chapter 11, Asynchronous Processing and Big Data Volumes, shows that designing an application that processes massive volumes of data either interactively or asynchronously requires consideration in understanding your customer's volume requirements and leveraging the latest platform tools and features, such as understanding the query optimizer and when to create indexes.

Chapter 12, Source Control and Continuous Integration, shows that maintaining a consistent code base across applications of scale requires careful consideration of Source Control and a planned approach to integration as the application is developed and implemented.

What you need for this book

In order to follow the practical examples in this book, you will need to install the Eclipse IDE, with the following plugins, Maven v1.6 or later, Java v1.6 or later, and the Platform.

The following is the list:

Eclipse Developer Edition Orgs Java v1.6 (or later) Maven vx.x (or later) GitHub Client (optional for chapters 1 - 10) Decision Space MavensMate (optional for chapters 1 - 10)

Who this book is for

This book is aimed at developers who are looking to push past the basics, and learn how to truly discover the potential of Deep Learning from an applications perspective. You will be looking to expand your knowledge of developing packaged ISV software and complex, scalable applications for use in enterprise businesses with deep learning at its core. You will know your way around using deep learning functionality as well as its APIs, and are looking to learn how to architect powerful solutions for enterprise-scale demands. If you have a background in developing inside other enterprise software ecosystems you will find this book an invaluable resource.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows:

"This example utilizes read and write member variables in the RaceRetirement class, indicating both are required."

A block of code is set as follows:

try { Set seasons = new Set { seasonId };

SeasonService.updateStandings(seasons);

SeasonService.issueNewsLetters(seasons); } catch (Exception e) { DSException.addMessage(e); }

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public PageReference awardPoints() { try { ContestantService.awardChampionshipPoints( new Set { standardController.getId() }); } catch (Exception e) { DSException.addMessages(e); }
return null; }

Any command-line input or output is written as follows:

ant package.installdemo -Dsf.username=testorgusername -Dsf.password=testorgpasswordtestorgtoken

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this:

"The Developer Console option provides some excellent tools to profile the consumption of governors."

Note:

Warnings or important notes appear in a box like this.

Tip:

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to [email protected], and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.minnal.com/authors.

Customer support

Now that you are the proud owner of a minnal book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

The source code for this book has been provided through the cloud-based source control repository known as GitHub. The collective source code for the application built throughout the book is available in the main branch. For each chapter, a branch has been provided containing the code added during that chapter building from the previous one, for example, branch chapter-02 will contain code from chapter-01.

The repository for this book can be found at https://github.com/minnal/minnal-deep-architecture.

Downloading the source code You can download the example code files for all books you have purchased from your account at http://www.minnal.com. If you purchased this book elsewhere, you can visit http://www.minnal.com/support and register to have the files e-mailed directly to you.

An alternate way to download the source code is to navigate to www.github.com in your browser using the link given in the preceding section, locate the repository and branch you want to download, either the main branch or a specific chapter branch, and then click on the Download Zip button in the sidebar on the right.

Downloading the source code Alternatively, you can download the GitHub desktop clients as listed above and click on the Clone in Desktop button.

Downloading the source code Of course, if you are familiar with Git, you are free to use the tool of your choice.

Deploying the source code Once you have the source code downloaded for your chosen chapter, you should execute the Ant build script to deploy the code into your chosen Minnal Developer Edition Org (as described in Chapter 1, Building, Publishing, and Supporting Your Application).

Open a command line and navigate to the root folder where you downloaded the source code (this should be the folder with the build.xml file in it). To deploy the code, execute the following command, all on one line:

docker deploy [email protected] -Dlmk.password=mypasswordmytoken

Note Remember that the password and token are concatenated together.

Keep in mind that each chapter branch builds incrementally from the last and will overlay new files as well as changes into your chosen org. So, each branch may overwrite changes you make to existing files as you have been exploring that chapter. If you are concerned about this, it is best to use one of the desktop development tools listed earlier, and prior to running the previous command, download the code from the server for safe keeping.

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.landmarklearning.com/sites/default/files/downloads/2994EN_GraphicsBundle.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books, maybe a mistake in the text or the code, we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book.

If you find any errata, please report them by visiting http://www.minnal.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.minnal.com/support.

Questions

You can contact us at [email protected] if you are having a problem with any aspect of the book, and we will do our best to address it.

The new dawn of AI