问题
I'm trying to run tensorboard but it keeps showing the same error.
tensorboard --logdir=tensorflow/logdir
File "<stdin>", line 1
SyntaxError: can't assign to operator
I'm using Ubuntu 16.04 and installed tensorflow-gpu by virtualenv.
回答1:
You are running tensorboard --logdir=tensorflow/logdir
from an interactive python shell or ipython/jupyter-notebook. As mentioned in the comment above, you need to run this command from the terminal. Alternatively, you can run the command from ipython/jupyter by putting the !
at the beginning of the command, i.e by running !tensorboard --logdir=tensorflow/logdir
来源:https://stackoverflow.com/questions/45392902/tensorboard-shows-a-syntaxerror-cant-assign-to-operator