I believe the explanation of bartgras is superseded by later versions of Keras (I am using Keras 2.2.2). To get the histograms in the Tensorboard, all I did was the following (where bg is the data processing class that the generator provides for gb.training_batch() ; gb.validation_batch() however is NOT a generator):
NAME = "Foo_{}".format(datetime.now().isoformat(timespec='seconds')).replace(':', '-') tensorboard = keras.callbacks.TensorBoard( log_dir="logs/{}".format(NAME), histogram_freq=1, write_images=True) callbacks = [ tensorboard ] history = model.fit_generator( bg.training_batch(), validation_data=bg.validation_batch(), epochs=EPOCHS, steps_per_epoch=bg.steps_per_epoch, validation_steps=bg.validation_steps, verbose=1, shuffle=False, callbacks=callbacks)
Jay borseth
source share