I'm currently using tensorflow and I want to visualize the effect of the convolutional neural network that I'm writing. However, I can't use tensorboard. I see the tensorboard underneath my conda env as envs/tensorenv/bin/tensorboard (python file). It imports this thing called tensorflow.tensorboard.tensorboard that it can't find.
(tensorenv)wifi-131-179-39-186:TensorflowTutorial hongshuhong$ tensorboard --logdir=log/
Traceback (most recent call last):
File "/Users/hongshuhong/anaconda/envs/tensorenv/bin/tensorboard", line 4, in <module>
import tensorflow.tensorboard.tensorboard
ImportError: No module named 'tensorflow.tensorboard.tensorboard'
Any help would be appreciated. Let me know if extra information is needed, thanks.
where the -p 6006 is the default port of TensorBoard.
Work it like this command
python /Users/USERNAME/anaconda/envs/tf/lib/python3.5/site-packages/tensorboard/main.py --logdir=./logs/
tensorboard.py
is changed to main.py
Actually @Andras Deak helped me with this answer, but according to this github issue link: https://github.com/tensorflow/tensorflow/issues/1790 The anaconda version doesn't work because for some reason the tensorboard is inside of the "backend" directory. you have to navigate yourself to the correct directory and execute the python script, which is:
python ~/anaconda/envs/tensorenv/lib/python3.5/site-packages/tensorflow/tensorboard/backend/tensorboard.py
It worked for me:
I'm currently working on a way for a permanent fix, but this is a temporary way to fix it.
EDIT: So actually for the permanent fix, all you need to do is copy tensorboard.py into the outer directory. For me, it was inside of
..../site-packages/tensorflow/tensorboard/backend/tensorboard.py
into
..../site-packages/tensorflow/tensorboard/tensorboard.py.
I kept the one in backend, and just copied it over and it seems to work for a scalar_summary display. Let me know if any errors come up guys!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With