How do I use the Tensorboard callback of Keras?

前端 未结 10 630
名媛妹妹
名媛妹妹 2020-12-04 04:57

I have built a neural network with Keras. I would visualize its data by Tensorboard, therefore I have utilized:

keras.         


        
10条回答
  •  旧时难觅i
    2020-12-04 05:47

    keras.callbacks.TensorBoard(log_dir='./Graph', histogram_freq=0,  
              write_graph=True, write_images=True)
    

    This line creates a Callback Tensorboard object, you should capture that object and give it to the fit function of your model.

    tbCallBack = keras.callbacks.TensorBoard(log_dir='./Graph', histogram_freq=0, write_graph=True, write_images=True)
    ...
    model.fit(...inputs and parameters..., callbacks=[tbCallBack])
    

    This way you gave your callback object to the function. It will be run during the training and will output files that can be used with tensorboard.

    If you want to visualize the files created during training, run in your terminal

    tensorboard --logdir path_to_current_dir/Graph 
    

    Hope this helps !

提交回复
热议问题