weights = tf.placeholder("float",[5,5,1,1])
imagein = tf.placeholder("float",[1,32,32,1])
conv = tf.nn.conv2d(imagein,weights,strides=[1,1,1,1],padding="SAME")
deconv = tf.nn.conv2d_transpose(conv, weights, [1,32,32,1], [1,1,1,1],padding="SAME")
dw = np.random.rand(5,5,1,1)
noise = np.random.rand(1,32,32,1)
sess = tf.InteractiveSession()
convolved = conv.eval(feed_dict={imagein: noise, weights: dw})
deconvolved = deconv.eval(feed_dict={imagein: noise, weights: dw})
我一直在尝试找出 conv2d_transpose 以反转 Tensorflow 中的卷积。我的理解是,在应用正常卷积然后转置之后,“反卷积”应该包含与“噪声”相同的数据,但“反卷积”只包含一些完全不同的图像。我的代码有问题,还是理论不正确?