Closed baodingge closed 7 years ago
Thanks for asking this question. It'll be a useful resource for many future explorers. So, here's the explanation:
According to this paper by Dr. Zeiler, the deconvolution operation is approximated as convolution with transpose of kernel or the weight matrix (Section 2.1 in Filtering). In tensorflow, the gradient of convolution output w.r.t input is defined as the convolution of output with the transpose of the kernel. Here's the TF documentation regarding gradient operation. This makes deconvolution and gradient of convolution one and the same operation.
Unpooling operation is explained in the paper, Section 2.1: as follows :
In the convnet, the max pooling operation is non-invertible, however we can obtain an approximate inverse by recording the locations of the maxima within each pooling region in a set of switch variables. In the deconvnet, the unpooling operation uses these switches to place the reconstructions from the layer above into appropriate locations, preserving the structure of the stimulus.
We realized that this too was same as computing gradient of max pooling operation and the backpropogating the previous layer's gradients. The gradient of max operation is also a switch with 1 at the maxima and 0 elsewhere. Hence, using the gradient directly should work for max pooling too.
Closing this now. Reopen if you've any further queries.
Hi falaktheoptimist!
Here is how I understand deconvolution operation, in order to get the reconstructed input, we should do activation * transpose of kernel.
So I am wondering why using "gradient" rather than "gradient activation", because gradient is just 1 transpose of kernel.
Hope you can see this.
And I am really appreciate for the nice project!
@falaktheoptimist @BhagyeshVikani
creating placeholders to pass featuremaps and
I do not understand this code, why it is, i can not see deconv or Unpooling