Tensorboard 可视化(一)画网络
编译工具pycharm 代码 # -*- coding:UTF-8 -*- """ Please note, this code is only for python 3+. If you are using python 2+, please modify the code accordingly. """ import tensorflow as tf def add_layer(inputs, in_size, out_size, activation_function=None): # add one more layer and return the output of this layer with tf.name_scope('layer'): with tf.name_scope('weights'): Weights = tf.Variable(tf.random_normal([in_size, out_size]), name='W') with tf.name_scope('biases'): biases = tf.Variable(tf.zeros([1, out_size]) + 0.1, name='b') with tf.name_scope('Wx_plus_b'): Wx_plus_b = tf.add(tf.matmul(inputs,