How to implement Deconvolution
Hi,
We want to implement the De-convolution or back propagation of convolution layer. We have come across the "convolution_backward_data" in MKL-DNN how ever we are unclear what are the input/outpu/weights params that we need to pass to this primitive descriptor.
Eg: 1)In brief this is what happens in Alexnet conv 1st layer We give input image 227x227x3 ,filters 11x11x3x96 are convolved to produce 55x55x96 output .
2)We want to know the procedure to deconv the above in reverse order and produce 227x227x3 image as output of deconv.? Could you give us the procedure/source code on how to do the same.
Thanks
Hi @Subarukun,
Sorry for so long delay with the answer. We have plans to support de-convolution natively in MKL-DNN (so that you can just use corresponding de-convolution primitive). Alas, no timeline on the actual implementation. So for now, as you correctly mentioned, you can try using backward pass of the convolution. Basically you src would be diff_dst, and weights would be weights. Your output then would be diff_src.
deconv_dst <-- deconv_fwd (deconv_src , deconv_weights)
^ ^ ^
| | |
v v v
diff_src <-- conv_bwd_data (diff_dst , weights )
There are two problems here:
- You will not be able to add bias, since backward pass doesn't have such a parameter
- The implementation might be not optimal. We've never optimized backward pass for the first convolution, since it is typically not required. So you might face with really slow reference or gemm code. On the other hand, backward pass for all the other convolutions should be reasonably well optimized.
Closed as outdated. Please fill free to re-open if you have any questions/concerns.