I am working on some image classification problem and I made Y Network for it. Y Network is a type of Neural Network which has two inputs and one output. If we want to fit our Tensorflow model we have to feed x_train and y_train in model.fit(). Like this -
model.fit([x_train, x_train], y_train, epochs=100, batch_size=64)
but how do I get x_train and y_train if I got my data from ImageDataGenerator ? Like this -
train_generator = train_datagen.flow_from_dataframe(... , batch_size=64, ...)
I tried getting x_train and y_train by this method:
x_train, y_train = train_generator.next()
but resulted x_train and y_train consist of only 64 images, I want all my 8644 images. I cannot increase batch_size to 8644 because it will need more memory and Google Colab will crash. What should I do ?