Unlike supervised image classification use cases, we will perform an anomaly detection task on the MNIST dataset. On top of that, we are using an unsupervised model, which means that we will not be using any type of label to perform the training process. To start the ETL process, we will extract this unsupervised MNIST data and prepare it so that it is usable for neural network training.
Extracting and preparing MNIST data
How to do it...
- Create iterators for the MNIST data using MnistDataSetIterator:
DataSetIterator iter = new MnistDataSetIterator(miniBatchSize,numOfExamples,binarize);
- Use SplitTestAndTrain to split the base iterator into train/test iterators:
DataSet ds = iter.next();
SplitTestAndTrain split = ds...