The source code for this chapter can be found at https://github.com/PacktPublishing/Java-Deep-Learning-Cookbook/tree/master/10_Developing_applications_in_distributed_environment/sourceCode/cookbookapp/src/main/java/com/javacookbook/app.
After cloning our GitHub repository, navigate to the Java-Deep-Learning-Cookbook/10_Developing_applications_in_distributed_environment/sourceCode directory. Then, import the cookbookapp project as a Maven project by importing the pom.xml file.
You need to run either of the following preprocessor scripts (PreProcessLocal.java or PreProcessSpark.java) before running the actual source code:
- https://github.com/PacktPublishing/Java-Deep-Learning-Cookbook/blob/master/10_Developing_applications_in_distributed_environment/sourceCode/cookbookapp/src/main/java/com/javacookbook/app/PreProcessLocal.java
- https://github.com/PacktPublishing/Java-Deep-Learning-Cookbook/blob/master/10_Developing_applications_in_distributed_environment/sourceCode/cookbookapp/src/main/java/com/javacookbook/app/PreprocessSpark.java
You will also need the TinyImageNet dataset, which can be found at http://cs231n.stanford.edu/tiny-imagenet-200.zip. The home page can be found at https://tiny-imagenet.herokuapp.com/.
It is desirable if you have some prior knowledge of working with Apache Spark and Hadoop so that you get the most out of this chapter. Also, this chapter assumes that Java is already installed on your machine and has been added to your environment variables. We recommend Java version 1.8.
Note that the source code requires good hardware in terms of memory/processing power. We recommend that you have at least 16 GB of RAM on your host machine in case you're running the source on a laptop/desktop.