TensorBoard

30 views
Skip to first unread message

kurt....@bluewin.ch

unread,
Nov 30, 2021, 5:18:24 AM11/30/21
to deep-learning-illustrated
Hi,
I am excited with the clarity and contents of the book 'Deep Learning Illustrated'.
All of the samples provided in GitHub are working perfectly so far (up to chapter  9.7) TensorBoard. Here I can not go to TensorBoard. For me it is not clear where I have to enter the command 'tensor board --logdir= ....'.
I am using Jupiter in the Container environment in MacOS.
When I enter the command in a new terminal, MacOs cannot find the command 'tensorboard'.
When I enter the command in the input line in Jupiter after the line out '<keras callbacks ...'
I get a syntax error as in the attached screenshot.
Q: How and where do I have to exactly enter the command 'tensor board ....'

Thank you very much for clarification.
Kind regards
Kurt
Screenshot 2021-11-30 at 10.49.42.png

Jon Krohn

unread,
Nov 30, 2021, 9:37:23 AM11/30/21
to deep-learning-illustrated
Hi Kurt! 

I'm delighted all of the examples in the book have worked for you thus far and that you're enjoying the book's contents :)

For simplicity, I'm going to assume you followed these installation instructions, which critically include opening up port 6006 for TensorBoard.

You were correct that the tensorboard commands need to be executed from a Unix command-line tool like Terminal. The tricky bit is that you need to run them from INSIDE the Docker container.

To enter into the Docker container from the Terminal command line:
  1. Use sudo docker ps to see the randomly-generated NAME of your Docker container
  2. Run the following command, replacing NAME with whatever randomly-generated name your Docker container has: sudo docker exec -it <NAME> bash 
That should do the trick!

All my best,
Jon

Jon Krohn

unread,
Nov 30, 2021, 9:39:00 AM11/30/21
to deep-learning-illustrated
To be even more clear, in step two I should have typed "replacing <NAME> with whatever"
Message has been deleted

kurt....@bluewin.ch

unread,
Dec 1, 2021, 10:16:12 AM12/1/21
to deep-learning-illustrated
Hi Jon,
thank you very much for your feedback. Following your suggestions I got some steps further, but still could not solve my problem.
after the following steps:
1) running "sudo docker ps" in a terminal session, I got following result back:

e759b3c76f0e   dli-stack   "tini -g -- start-no…"   5 minutes ago   Up 5 minutes   0.0.0.0:6006->6006/tcp, 0.0.0.0:8888->8888/tcp   eloquent_proskuriakova

2) In the same terminal session I run the following command: "sudo docker exec -it eloquent_proskuriakova bash"

which passed me to the following directory:  jovyan@e759b3c76f0e:~$

3) after the command "tensorboard --logdir='logs/deep-net' --port 6006"

I got the following response back:

2021-12-01 13:55:40.761780: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

TensorBoard 1.8.0 at http://e759b3c76f0e:6006 (Press CTRL+C to quit)

4) then I had to enter the following command in the browser: "http://localhost:6006/?token=e759b3c76f0"

which started the TensorBoard GUI in the browser with the correct lodger, but with no data in the log directory. Message: No dashboards are active for the current dataset

This although I run in the Jupyter terminal the following code:
====> see screenshot in the bottom of this message (sorry I cannot delete the following entries )
Screenshot 2021-12-01 at 16.00.40.png

kurt....@bluewin.ch

unread,
Dec 4, 2021, 10:18:14 AM12/4/21
to deep-learning-illustrated
Hello all,
when I look at the logs (which are within $(pwd)/work/notebooks/deep-net/..) the following is written into the log:

Error! /home/jovyan/work/notebooks/logs/deep-net/events.out.tfevents....... is not UTF-8 encoded
saving disabled
see Console for more details

Q: where can I enable UTF-8 encoding? Is this the error why I do not see any Tensorboard output? How to correct?

Thanks for feedback.

kurt....@bluewin.ch

unread,
Dec 4, 2021, 11:23:50 AM12/4/21
to deep-learning-illustrated
Hi all,
I did not pass the correct path to Tensorboard when starting. Now it works!

For every one having the same problem, this is the way I could start Tensorboard correctly:

1) start Docker Desktop
2) start tensorboard with the command "source rundocker.sh"  (within the folder "deep-learning-illustrated)
3)  run Tensorflow as in the book (with the file "deep_net_in_keras_with_tensoarboard")
4)  in a MacOS terminal run "sudo docker ps" ( to list running docker-containers )
5) in this terminal-ws run "docker exec -it **** bash (with **** as container-id printed in the output of docker ps command)
6) in this terminal ws run "tensorboard --logdir='work/notebooks/logs/deep-net' --port 6006
7) in a browser open: "http://localhost:6006

Hope this will work for others too.

Jon Krohn

unread,
Dec 4, 2021, 3:11:49 PM12/4/21
to deep-learning-illustrated
Outstanding detective work, Kurt! I was hoping to find some time to dig into this for you this weekend and am absolutely delighted to discovered you've figured it all out. Thank you for sharing your clear instructions with the world and I will consider adding these extra instructions into a future edition of the book.

Keep on rockin',
Jon

Reply all
Reply to author
Forward
0 new messages