TimW
(Tim Wuyts)
March 6, 2017, 12:08pm
1
When checking out examples/tutorials that use Tensorflow, some of them use a tool called Tensorboard that looks very helpful when creating your model.
see https://www.tensorflow.org/get_started/summaries_and_tensorboard
It allows you to visualise the model, and graph out the learning process.
Since we are using Theano as the backend for this course, I was wondering if there were similar tools for Theano or Keras?
JRicon
(Jose Luis Ricon)
March 6, 2017, 12:26pm
2
I was wondering the same yesterday
The closest thing Iāve found is this https://github.com/fchollet/hualos but I havenāt tried it. And it is quite old.
davecg
(David Gutman)
March 6, 2017, 12:51pm
3
Sure there is a Tensorboard āalternativeā for Keras.
Itās called Tensorboard.
There is a Keras Tensorboard callback (something you add to the fit or fit_generator method in a list).
https://keras.io/callbacks/
As long as you are using the TF backend it will work. Iām not great with Tensorboard so have never tried anything more than basic visualizations, but those work. Iām guessing you could do some more advanced stuff by adding pure TensorFlow summarization code to your Keras model, but donāt know enough about it.
EDIT: I see the OP is using the theano backend - unfortunately that wonāt work with the Tensorboard callback. If there is some other package you want to use you could wrap it in a custom callback to get a similar logging feature.
1 Like
s.s.o
(s.s.o)
March 6, 2017, 1:12pm
4
If you installed TF. you can check the link tensorboard stackoverflow
mainly you can use the answer from Nassim Ben.
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 ran 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_graph_dir/Graph