Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tensorflow 批量大小对最大池层输入维度的影响?_Tensorflow - Fatal编程技术网

Tensorflow 批量大小对最大池层输入维度的影响?

Tensorflow 批量大小对最大池层输入维度的影响?,tensorflow,Tensorflow,在以下代码中,批处理大小为10,输入通道为2,输出通道为32。我知道卷积的输出作为最大池层的输入,最大池层的输出作为全连接层的输入。根据我的理解,图像高度图像宽度输出通道(2*2*32)作为最大池层的输入。表示大小为2 x 2的32幅图像。但在输入层中有10幅图像。最大池的输入是否为10*2*2*32 input = tf.Variable(tf.random_normal([10,4,4,2])) filter = tf.Variable(tf.random_normal([2,2,1,32]

在以下代码中,批处理大小为10,输入通道为2,输出通道为32。我知道卷积的输出作为最大池层的输入,最大池层的输出作为全连接层的输入。根据我的理解,图像高度图像宽度输出通道(2*2*32)作为最大池层的输入。表示大小为2 x 2的32幅图像。但在输入层中有10幅图像。最大池的输入是否为10*2*2*32

input = tf.Variable(tf.random_normal([10,4,4,2]))
filter = tf.Variable(tf.random_normal([2,2,1,32]))
result = tf.nn.conv2d(input, filter, strides=[1, 2, 2, 1], padding='SAME')

输入将为2x2,它将用于32个特征贴图(“图像”),因此深度将相同(32)。批次大小意味着它将对整个批次(10)执行此操作

因此,您可能会说10*2*2*32,但事实上,max pool操作只发生在2*2功能映射中