How to do it...

  1. Download, extract, and copy the contents of the TinyImageNet dataset to the following directory location:
* Windows: C:\Users\<username>\.deeplearning4j\data\TINYIMAGENET_200 * Linux: ~/.deeplearning4j/data/TINYIMAGENET_200
  1. Create batches of images for training using the TinyImageNet dataset:
File saveDirTrain = new File(batchSavedLocation, "train"); SparkDataUtils.createFileBatchesLocal(dirPathDataSet, NativeImageLoader.ALLOWED_FORMATS, true, saveDirTrain, batchSize);
  1. Create batches of images for testing using the TinyImageNet dataset:
File saveDirTest = new File(batchSavedLocation, "test"); SparkDataUtils.createFileBatchesLocal(dirPathDataSet, NativeImageLoader.ALLOWED_FORMATS, true, saveDirTest, batchSize);
  1. Create ...

Get Java Deep Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.