python - Trying to show graph and other details in TensorBoard on google-colab by ngrok but failed
问题描述
I trained a model, got a log file and show graph and other details in TensorBoard on my computer. It was successful and nothing wrong.
Then I tried to do it again on colab. I install ngrok and tensorboard on colab, upload the log file and call tensorboard to show information.
# Install tensorboardcolab,download and unzeip ngrok
!pip install tensorboardcolab
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
print()
# Delete unuse file and folder
!rm ngrok-stable-linux-amd64.zip
!rm -f -r sample_data
!pwd
!ls
print()
# upload a log file from local
from google.colab import files
uploaded = files.upload()
!ls
print()
# start tensorboard on ngrok
get_ipython().system_raw('tensorboard --logdir /content --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'])"
Below is the output after I ran the above.
Requirement already satisfied: tensorboardcolab in /usr/local/lib/python3.6/dist-packages (0.0.22)
--2019-06-17 08:01:48-- https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
Resolving bin.equinox.io (bin.equinox.io)... 52.72.145.109, 52.203.66.95, 52.200.123.104, ...
Connecting to bin.equinox.io (bin.equinox.io)|52.72.145.109|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16648024 (16M) [application/octet-stream]
Saving to: ‘ngrok-stable-linux-amd64.zip’
ngrok-stable-linux- 100%[===================>] 15.88M 17.0MB/s in 0.9s
2019-06-17 08:01:49 (17.0 MB/s) - ‘ngrok-stable-linux-amd64.zip’ saved [16648024/16648024]
Archive: ngrok-stable-linux-amd64.zip
inflating: ngrok
/content
ngrok
events.out.tfevents.1560697268.DESKTOP-SMMCEHS(n/a) - 3431006 bytes, last modified: 6/16/2019 - 100% done
Saving events.out.tfevents.1560697268.DESKTOP-SMMCEHS to events.out.tfevents.1560697268.DESKTOP-SMMCEHS
events.out.tfevents.1560697268.DESKTOP-SMMCEHS ngrok
http://c9c33cc9.ngrok.io
I got this in the link. It said "No dashboards are active for the current data set".
Here is the notebook on colab.
I have no idea why this happened. There is a valid tensorboard link so I guess ngrok worked fine. Checked TensorBoard tutorial but it focus on how to use in a local environment.
Can anyone help me with this? Any reply would be greatly appreciated.
解决方案
推荐阅读
- rest - 当 API 需要执行验证时,ReST API 遵循的命名约定
- flutter - Flutter 中的持久可拖动底部工作表
- javascript - 为 Tesseract OCR 制作训练数据时的 font_properties 是什么?
- ruby - 如何将八位字节字符串转换为数字?
- c++ - 使用 Qt C++ 截屏
- java - 发现蓝牙设备
- c++ - Boost deadline_timer 在到期时不会被调用
- c# - 如何在 Visual Studio 2017 的 C# Razor 中获取当前日期
- firemonkey - Android 上的迭代器错误/冲突与 push_back(FMX、C++)
- php - 有没有办法在没有 Composer 和 XAMPP 的情况下使用 PHPMailer 发送电子邮件