gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 09:49:47 26 4
gpt4 key购买 nike

我是 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com