python


5、可视化tensorflow

<p><a href="https://jingyan.baidu.com/article/425e69e6147272be15fc16ed.html">https://jingyan.baidu.com/article/425e69e6147272be15fc16ed.html</a></p> <pre><code class="language-python">import tensorflow as tf a = tf.constant([1.0,2.0,3.0],name='input1') b = tf.Variable(tf.random_uniform([3]),name='input2') add = tf.add_n([a,b],name='addOP') with tf.Session() as sess: sess.run(tf.global_variables_initializer()) writer = tf.summary.FileWriter("D://TensorBoard//test",sess.graph) print(sess.run(add)) writer.close() #把训练好的图放在D://TensorBoard//test里面。 #打开命令行-执行 D:\TensorBoard\test&gt;tensorboard --logdir=D://TensorBoard//test W0907 18:21:55.146587 Reloader tf_logging.py:86] Found more than one graph event per run, or there was a metagraph containing a graph_def, as well as one or more graph events. Overwriting the graph with the newest event. W0907 18:21:55.147585 Reloader tf_logging.py:86] Found more than one metagraph event per run. Overwriting the metagraph with the newest event. TensorBoard 0.1.8 at http://acer:6006 (Press CTRL+C to quit) 访问:http://acer:6006 </code></pre>

页面列表

ITEM_HTML