How can I implement deconvolution on CNN (TensorFlow)?
Deconvolution have very simple structure: unpooling &rarr; deconv
like this: 

# Unpooling
Ps = (tf.gradients(pooled, h))[0]
unpooled = tf.multiply(Ps, P)

# Deconv
batch_size = tf.shape(self.input_x)[0]
ds = [batch_size]
ds.append(self.embedded_chars_expanded.get_shape()[1])
ds.append(self.embedded_chars_expanded.get_shape()[2])
ds.append(self.embedded_chars_expanded.get_shape()[3])
deconv_shape = tf.stack(ds)
deconv = tf.nn.conv2d_transpose(
    unpooled,
    W,
    deconv_shape,
    strides=[1, 1, 1, 1],
    padding='VALID',
    name="Deconv"
    )