7

I have set up Tensorboard with Keras as a callback, like so:

callback_tb = keras.callbacks.TensorBoard(log_dir=tb_dir, histogram_freq=2,write_graph=True,write_images=True)
callbacks_list = [callback_save,callack_view, callback_tb]
model.fit(x_train,y_train,
                  batch_size=batch_size,
                  epochs=epochs,
                  callbacks=callbacks_list,
                  verbose=1,
                  validation_data=(x_test,y_test),
                  shuffle='batch')

This works fine and I can see loss and accuracy graphs on Tensorboard. I am generating and saving model predictions in another file, but I want to know if it is possible to view these images on Tensorboard with Keras?

I have found the tf.summary.image function on https://github.com/tensorflow/tensorboard But I don't understand how this relates to Keras. Any help would be appreciated.

saul gold
  • 143
  • 4
  • 9

1 Answers1

0

I fixed my problem by creating my own Keras callback based on the TensorBoard callback, where I could use the tf.summary.image feature

saul gold
  • 143
  • 4
  • 9
  • 2
    Hi! I would be very interested in your solution. I tried to modify the Tensorboard callback from keras with using tf.summary.image to display prediction outputs but cannot make it work... – RomaneG Feb 12 '18 at 17:30
  • To be honest I have better luck just saving the images as a matplotlib subplot. Displaying images on Tensorboard is very clunky and slow – saul gold Feb 14 '18 at 16:38
  • @RomaneG To saul, I would be grate if you would write the sollution. I have the same issue as RomaneG. And to RomaneG, have you solved this problem eventually? – Fallen Apart May 31 '18 at 12:52
  • 2
    @FallenApart this problem has been solved in another thread here: https://stackoverflow.com/questions/43784921/how-to-display-custom-images-in-tensorboard-using-keras?noredirect=1#comment85726690_43784921 – RomaneG May 31 '18 at 18:30