Keras: Create a custom generator for two input model using flow_from _directory() function
问题 I was trying to train my siamese network with fit_generator() ,I learned from this answer: Keras: How to use fit_generator with multiple inputs that the best way to do this was to create your own generator that yield the multiple data points, my problem was that I retrieve my data with flow_from_directory() function and I didn't know if that was possible. This is my attempt to readapt a generator for my problem: from keras.models import load_model from keras import optimizers from keras