1.3 变量的初始化
注意1.2中说过,前面所有在计算图中的操作都是定义计算图,并没有真正的运行。只有在会话中运行后才会真正的计算。..._res, weights, biases, 1.0)
cnn3_shape = cnn3_res.shape.as_list()[1:]
h3_s = reduce(lambda...x, y: x * y, cnn3_shape)
cnn3_reshape = tf.reshape(cnn3_res,[-1,h3_s])
# layer_4
with...占位符和常量
3.1 占位符
tf.placeholder()函数定义:
def placeholder(dtype, shape=None, name=None)
dtype:表示tensorflow...常用于网络的输入层输出定义,这两层是没有网络参数的更新:
X = tf.placeholder(tf.float32, shape = [None,32*32,3])
None表示该维度的大小不确定,因为我们会修改