davidkorea / tensorflow

0 stars 0 forks source link

Open Tensorborad in Kaggle Kernel #1

Open davidkorea opened 5 years ago

davidkorea commented 5 years ago

Open Tensorborad in Kaggle Kernel

1. open tensorboard locally

writer = tf.summary.FileWriter('./graph1', sess.graph)
writer.close()
sess.close()

!tensorboard --logdir='./graph1'

2. open tensorboard on Kaggle Kernel

open internet in kaggle kernel

# At first in settings, Make sure that Internet option is set to "Internet Connected"
# After executing this cell, there will come a link below, open that to view your tensor-board

!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
LOG_DIR = './graph1' # Here you have to put your log directory
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'])"
davidkorea commented 5 years ago

20181119162041