O'Reilly logo

Mastering Machine Learning with Spark 2.x by Michal Malohlava, Max Pumperla, Alex Tellez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building models and inspecting results

So now that you understand a little about the parameters and the model that we want to run, it's time to go ahead and train and inspect our network:

val dl = new DeepLearning(dlParams) 
val dlModel = dl.trainModel.get 

The code created the DeepLearning model builder and launched it. By default, the launch of trainModel is asynchronous (that is, it never blocks, but returns a job), but it is possible to wait until the end of computation by calling the method get. You can also explore the job progress in UI or even explore the unfinished model by typing getJobs into the Flow UI (see Figure 18).

Figure 18 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required