I have the following snippet of code to do deconv.
x.get_shape() gives me (?, 14, 14, 128)
self.w.get_shape() gives me (3, 3, 64, 128)
output_shape should be (?, 14, 14, 64)
filter size is [3, 3], stride is [1, 1, 1, 1] and padding is 'SAME'
but h.get_shape() gives me (?, ?, ?, 128) which I was expecting to see (?, 14, 14, 64).
Can you help me to spot where is the error?
print(x.get_shape())
print(self.w.get_shape())
output_shape = tf.pack([tf.shape(x)[0],
self.output_size[0],
self.output_size[1],
self.output_size[2]])
h = self.activation(
tf.nn.bias_add(
tf.nn.conv2d_transpose(
x, self.w,
output_shape=output_shape,
strides=self.stride,
padding=self.padding
), self.b
)
)
print(h.get_shape())