本文介绍了Tensorflow可视化器“Tensorboard”不在Anaconda下工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用张量流,我想要想象我正在编写的卷积神经网络的效果。但是,我不能使用张量板。我看到我的conda env下面的张量板是envs / tensorenv / bin / tensorboard(python文件)。它导入了一个名为tensorflow.tensorboard.tensorboard的东西,它无法找到。

 ( tensorenv)wifi-131-179-39-186:TensorflowTutorial hongshuhong $ tensorboard --logdir = log / 
Traceback(最近一次调用最后一次):
文件/ Users / hongshuhong / anaconda / envs / tensorenv / bin / tensorboard,第4行,< module>
import tensorflow.tensorboard.tensorboard
ImportError:没有名为'tensorflow.tensorboard.tensorboard'的模块'






  • 我尝试寻找tensorflow.tensorboard.tensorboard,但我在目录中的任何地方都看不到它。

  • 我在anaconda下使用Mac OSX的tensorflow发行版,使用python 3.5.1并使用anaconda的软件包。

  • 我正在使用ipython notebook对于convnet的代码。



任何帮助将不胜感激。如果需要额外的信息,请告诉我,谢谢。

解决方案

实际上@Andras Deak帮我解决了这个问题,但根据这个github问题链接:



我目前正在寻找一种永久修复的方法,但这是一种修复它的临时方法。



编辑:所以实际上对于永久修复,所有你需要做的是将tensorboard.py复制到外部目录中。对我来说,它在
之内

  .... / site-packages / tensorflow / tensorboard / backend / tensorboard.py 

into

  .... / site-packages / tensorflow / tensorboard / tensorboard.py。 

我把它保留在后端,然后将其复制到它似乎适用于scalar_summary显示。如果有任何错误,请告诉我们!


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'

  • I tried looking for the tensorflow.tensorboard.tensorboard but I don't see it anywhere in my directories.
  • I'm using Mac OSX distro of tensorflow under anaconda, using python 3.5.1 and using anaconda's packages.
  • I'm using ipython notebook for the code for the convnet.

Any help would be appreciated. Let me know if extra information is needed, thanks.

解决方案

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!

这篇关于Tensorflow可视化器“Tensorboard”不在Anaconda下工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 21:24