Skip to content

TensorBoard

Harald Schilly edited this page Dec 13, 2017 · 8 revisions

How do I use TensorBoard in CoCalc?

Here's a step-by-step tutorial.

  1. Use TensorFlow as usual to train a model and put the output in a log directory.

Create a new Terminal by clicking "+New", then Terminal. There are many ways to train a tensorflow model and tons of tutorials. One way is to do:

~$ wget  https://raw.githubusercontent.com/tensorflow/tensorflow/r1.4/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py 
~$ python3 mnist_with_summaries.py 

(NOTE: You must have the project network access upgrade, or the wget above will hang.)

  1. Start TensorBoard in another Terminal, pointed out the log file for the model you are training above, by typing
~$ tensorboard --logdir=/tmp/tensorflow/mnist
TensorBoard 0.4.0rc3 at http://project-4a5f0542-5873-4eed-a85c-a18c706e8bcd:6006 (Press CTRL+C to quit)
  1. Once TensorBoard starts, you can view your beautiful TensorBoard server running at
https://cocalc.com/4a5f0542-5873-4eed-a85c-a18c706e8bcd/server/6006/

where you have to replace 4a5f0542-5873-4eed-a85c-a18c706e8bcd by your project_id, which can see in your browser URL or in project settings.

Note that your TensorBoard viewer will only be available to collaborators on your project, not anybody in the world.

Clone this wiki locally