python-2.7 - 错误:- tensorboard: command not found .但是,在输入locatetensorboard时,我得到了位置

标签 python-2.7 machine-learning tensorflow deep-learning tensorboard

我是 tensorflow 的初学者。我运行了一个简单的脚本,如下所示:

import tensorflow as tf

a =tf.constant(2)
b  = tf.constant(3)
c = tf.add(a,b)

with tf.Session() as sess:
    writer = tf.summary.FileWriter('./graphs',sess.graph)
    print sess.run(c)

writer.close()

保存这个 python 文件后,我在终端中运行它。有使用 2 个事件文件创建的文件夹图。然后我在终端上运行以下命令:

tensorboard --logdir="./graphs"

我收到以下错误:

tensorboard: command not found

请帮忙。提前致谢。 ​

最佳答案

正如您提到的,您正在获取 tensorboard 位置,请尝试使用本地路径运行命令,例如

/your/path/tensorboard --logdir="./graphs"

希望这对您有帮助,祝您编码愉快

关于python-2.7 - 错误:- tensorboard: command not found .但是,在输入locatetensorboard时,我得到了位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47218308/

相关文章:

python - 属性错误: 'Tensor' object has no attribute 'numpy' in Tensorflow 2. 1

python - 在 Slurm 集群上运行 TensorFlow?

R 预测模型 预测原因和倾向 %

Tensorflow/Keras - 如何公开类别之间的关系?

java - Flappy Bird 遗传算法种群改进

测试无监督机器学习算法

python - 在具有急切执行的 TensorFlow 2.0 中,如何计算特定层的网络输出梯度?

python - 如何使用 Flask 可插入 View 重用查看和编辑代码

python - 如何更改框架的背景 - Tkinter!?

python 随机播种是确定性的,但它不应该是