Skip to content

Instantly share code, notes, and snippets.

@fuatbeser
Created August 19, 2018 10:53
Show Gist options
  • Save fuatbeser/e2236510d30ed21153ebeb03a4f74974 to your computer and use it in GitHub Desktop.
Save fuatbeser/e2236510d30ed21153ebeb03a4f74974 to your computer and use it in GitHub Desktop.
Run Tensorboard in Google Colab
# You can change the directory name
LOG_DIR = 'tb_logs'
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
import os
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
get_ipython().system_raw(
'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
.format(LOG_DIR))
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'])"
@Youzhenwan
Copy link

I use your way,but when I turn to the page of tensorboard,I met the problem"No dashboards are active for the current data set.",How can I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment