Keras Tensorboard callback does not write images
I am trying to visualize the scales of my Keras model using Tensorboard. Here is the model I'm using:
model = Sequential([
Conv2D(filters=32, kernel_size=(3,3), padding="same", activation='relu', input_shape=(40,40,3)),
MaxPooling2D(pool_size=(2, 2)),
Conv2D(filters=64, kernel_size=(5,5), padding="same", activation='relu'),
MaxPooling2D(pool_size=(2, 2)),
Flatten(),
Dense(1024, activation='relu'),
Dropout(0.5),
Dense(43, activation='softmax'),
])
model.compile(optimizer='sgd',
loss='categorical_crossentropy',
metrics=['accuracy'])
and I train with this call:
model.fit_generator(
...
callbacks = [
ModelCheckpoint('models/gtsrb1-{epoch}.hdf5', verbose=1, save_best_only = True),
TensorBoard(log_dir='tblogs/', write_graph=True, write_grads=True, write_images=True),
EarlyStopping(patience=5, verbose=1),
],)
However, when I run TensorBoard, this is what I get:
Scalar and graphics look fine, so it's not the wrong problem logdir
. What am I doing wrong here?
+3
source to share
1 answer
You need to add histogram_freq=x
where x
must be nonzero to enable recording of images.
But if you do that, it may still not work, depending on the Keras version (see https://github.com/fchollet/keras/issues/6096 )
+2
source to share