问题
I made some log files using tensorboard but I can't access them.
Using
tensorboard
or tensorboard --logdir=logs/
on the command prompt
gives the following error:-
C:\Users\User>tensorboard
Traceback (most recent call last):
File "C:\Users\User\Anaconda3\Scripts\tensorboard-script.py", line 6, in <module>
from tensorboard.main import run_main
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\main.py", line 40, in <module>
from tensorboard import default
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\default.py", line 38, in <module>
from tensorboard.plugins.beholder import beholder_plugin
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\__init__.py", line 15, in <module>
from tensorboard.plugins.beholder.beholder import Beholder
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\beholder.py", line 25, in <module>
from tensorboard.plugins.beholder import im_util
File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\im_util.py", line 89, in <module>
class PNGDecoder(util.PersistentOpEvaluator):
AttributeError: module 'tensorboard.util' has no attribute 'PersistentOpEvaluator'
I tried this solution, but it did not help.
回答1:
I also had a big fight with this problem. What eventually worked for me was the following:
- pip uninstall tensorflow
- pip uninstall tensorboard
- conda show OR pip show --> have a look at which other tensorflow related packages you have installed and remove them.
- Go to site-packages and remove tensorflow/tensorboard folders (look for any folder in your filesystem related to a tensorflow / tensorboard installation)
- conda clean --all (not sure if this is necessary, but it was one of my steps and might be relevant)
- Reinstall tensorflow and tensorboard. Preferably use conda as it is faster by several orders of magnitude
One of my main sources in solving this issue was this github issue thread: https://github.com/tensorflow/tensorboard/issues/1724
来源:https://stackoverflow.com/questions/53966020/attributeerror-module-tensorboard-util-has-no-attribute-persistentopevaluato