2
votes

I would like to use TensorBoard in TensorFlow 1 in Google Colab. The tutorials I have found seem to be on TensorFlow 2 and the suggestions do not seem to work in TensorFlow 1.

It seems I need some equivalent to tf.summary.create_file_writer and tf.summary.scalar. I have tried tf.contrib.summary.create_file_writer and tf.contrib.summary.scalar, but these do not seem to work.

Here is the recreation of my problem:

https://colab.research.google.com/drive/1M3CL0oasd8pCjXLaaHl15I1yz-LUXNhq

1
Alternatively, if I use tf.summary.scalar with tf.contrib.summary.create_file_writer, the event seems to appear in the logs but is not being recognized.Joseph Konan
The event seems to be in the logs but it is not being recognized. Either something is wrong with how it is being logged or tensorboard is looking in the wrong place.Joseph Konan

1 Answers

1
votes
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip

get_ipython().system_raw('tensorboard --logdir /content/trainingdata/objectdetection/ckpt_output/trainingImatges/ --host 0.0.0.0 --port 6006 &')

get_ipython().system_raw('./ngrok http 6006 &')

! curl -s http://localhost:4040/api/tunnels | python3 -c \
 "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

This gives you a tensorboard from the log files created. And it works with TF1.13