TensorFlow 1 中的 TensorBoard 使用 Google Colab

TensorBoard in TensorFlow 1 using Google Colab

我想在 Google Colab 中使用 TensorFlow 1 中的 TensorBoard。我找到的教程似乎是关于 TensorFlow 2 的,而这些建议似乎在 TensorFlow 1 中不起作用。

看来我需要一些相当于 tf.summary.create_file_writer 和 tf.summary.scalar 的东西。我试过 tf.contrib.summary.create_file_writer 和 tf.contrib.summary.scalar,但这些似乎都不起作用。

这是我的问题的再现:

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

!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'])"

这会根据创建的日志文件为您提供张量板。它适用于 TF1.13