tf.summary + tensorboard 用来把graph图中的相关信息,如结构图.学习率.准确率.Loss等数据,写入到本地硬盘,并通过浏览器可视化之. 整理的代码如下: import tensorflow as tf x_train = [1, 2, 3, 6, 8] y_train = [4.8, 8.5, 10.4, 21.0, 25.3] x = tf.placeholder(tf.float32, name='x') y = tf.placeholder(tf.float32