I want to split my training data, test data and validation data into batches. I am working on Fashion MNIST dataset and accessing it directly from keras.datasets. I found the code mentioned below:
trainbatches = ImageDataGenerator().flowfromdirectory(trainpath, targetsize=(224,224), classes= classname, batchsize=10 testbatches = ImageDataGenerator().flowfromdirectory(testpath, targetsize=(224,224), classes= classname, batchsize=10
valbatches = ImageDataGenerator().flowfromdirectory(valpath, targetsize=(224,224), classes= classname, batch_size=10
As I have not downloaded the data on hard drive and accessing it from keras.datasets
, how can I perform this action?
I tried with ImageDataGenerator().flow
but it does not work?
Is there a way to perform this?