问题
I've been having problems with tensorboard probably due to a unclean exit in windows10. I use the below code to launch it in Jupyter:
%load_ext tensorboard
%tensorboard --logdir={dir}
this is what I got:
'ERROR: Timed out waiting for TensorBoard to start. It may still be running as pid 24472.'
and below code in cmd window to launch TB in Chrome:
$ tensorboard --logdir {dir}'
this is what I got: tensorboard_error
I've done some research and tried the following things:
-"taskkill /im tensorboard.exe /f"
to kill all live pids in command- -deleted all the pid-xxxx.info files in the "%TMP%.tensorboard-info" directory.
- -deleted the whole "%TMP%.tensorboard-info" directly
That didn't help.
Then I tried to change the port to 6005
by adding "--port 6005"
in command window and TB could launch in Chrome under "localhost:6005
. but it won't work in Jupyter.
Any idea how I can get TB to run in Jupyter again? Thanks.
回答1:
Reading this Github issue, you can find that specifying the host manually when launching Tensorboard apparently does the trick.
Instead of
%tensorboard --logdir {logs_base_dir}
Run
%tensorboard --logdir {logs_base_dir} --host localhost
回答2:
Did you try mentioning the same port in the Jupyter notebook
%load_ext tensorboard
%tensorboard --logdir={dir} --port=6005
来源:https://stackoverflow.com/questions/60983776/tensorboard-not-running-properly-on-port-6006