擅长:python、mysql、java
<p>回答起来可能有点晚,但这正是我在Python3.6.2中的工作原理:</p>
<pre><code>import tensorflow as tf
from tensorboard import main as tb
tf.flags.FLAGS.logdir = "/path/to/graphs/"
tb.main()
</code></pre>
<p>它使用默认配置运行tensorboard,并在“/path/to/graphs/”中查找图表和摘要。当然,您可以更改日志目录并使用以下命令设置任意多个变量:</p>
<pre><code>tf.flags.FLAGS.variable = value
</code></pre>
<p>希望有帮助。</p>