我不明白Tensorflow中'专家的深层mnist'中的mnist例子。不明白张量流中的mnist例子
为了建立一个深度网络,我们堆叠了这种类型的几个层。第二层将为每个5x5修补程序提供64个功能。
W_conv2 = weight_variable([5, 5, 32, 64])
b_conv2 = bias_variable([64])
h_conv2 = tf.nn.relu(conv2d(h_pool1, W_conv2) + b_conv2)
h_pool2 = max_pool_2x2(h_conv2)
我不知道为什么outputchannel是64
我认为我们需要32 * 2 * 5 * 5滤波器64 outputchannel,所以
W_conv2 = weight_variable([5, 5, 32, 2])
第一所有,我很抱歉不好英语 也许你很难理解我的问 所以我',写sudo代码逻辑
inputimage = arr[1][28][28][32]
w_conv2 = arr[5][5][32][2]
output = [1][28][28][64]
for batch in 1
for input in 32
for output in 2
output[][][][input*output] = conv(inputimage,w_conv2)
我认为它使62输出功能使用32 * 2过滤器和节省内存 什么部分是错误的?
谢谢
看看[这个问题](http://stackoverflow.com/questions/42507766/why-am-i-getting -only-one-channeled-output-through-the-tf-nn-conv2d)and [this question](http://stackoverflow.com/questions/34619177/what-does-tf-nn-conv2d-do-in -tensorflow),你会得到你的答案。 – jabalazs
首先,我为不好英语 也许你很难理解对不起我问 所以我写sudo的代码逻辑 inputImage的ARR = [1] [28] [28] [32] w_conv2 =常用3 [5] [5] [32] [2] 输出= [1] [28] [28] [64] 批量在1 \t用于输入在32 \t \t用于输出在2 \t \t \t输出[] [] [] [输入*输出] = conv(inputimage,w_conv2) 我认为它使62输出功能使用32 * 2过滤器并节省内存 什么部分是错误的? 谢谢 –
你也可以看我的答案[这里](http://stackoverflow.com/a/42451067/3941813),一个非常类似的问题。 – jabalazs