tf.histogram_summary(layer_name+"/weights",Weights) #name命名,Weights赋值
tf.scalar_summary('loss',loss) #命名和赋值
#合并到Summary中
merged = tf.merge_all_summaries()
#选定可视化存储目录
writer = tf.train.SummaryWriter("/目录",sess.graph)
result = sess.run(merged)#merged也是需要run的
writer.add_summary(result,i)