本文介绍了张量板显示语法错误:无法分配给运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 tensorboard,但它一直显示相同的错误.

tensorboard --logdir=tensorflow/logdir文件<stdin>",第 1 行语法错误:无法分配给运算符

我使用的是 Ubuntu 16.04 并通过 virtualenv 安装了 tensorflow-gpu.

解决方案

您正在从交互式 python shell 或 ipython/jupyter-notebook 运行 tensorboard --logdir=tensorflow/logdir.正如上面的评论中提到的,您需要从终端运行此命令.或者,您可以通过将 ! 放在命令的开头来从 ipython/jupyter 运行命令,即通过运行 !tensorboard --logdir=tensorflow/logdir >

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.

解决方案

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

这篇关于张量板显示语法错误:无法分配给运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 21:27