Keras: entradas múltiples para fit_generator utilizando flow_from_directory

¿Es posible tener dos flow_from_directory en un fit_generator?

Por ejemplo

train_generator_1 = train_datagen.flow_from_directory( train_data_dir_1, target_size=(img_height, img_width), batch_size=batch_size, class_mode='binary') train_generator_2 = train_datagen.flow_from_directory( train_data_dir_2, target_size=(img_height, img_width), batch_size=batch_size, class_mode='binary') custom_vgg_model.fit_generator( [train_generator_1, train_generator_2], steps_per_epoch=nb_train_samples, epochs=epochs, validation_data=validation_generator, validation_steps=nb_validation_samples, callbacks=[checkpointer, csv_logger]) 

Puedes intentar hacer un generador que contenga tanto:

En Python 3:

 def doubleGenerator(generator1,generator2): while True: for (x1,y1),(x2,y2) in zip(generator1,generator2): yield ([x1,x2],y1)