Caffe Deconvolution 的定义与计算过程
1. Deconvolution
1.1 Deconvolution Layer
https://caffe.berkeleyvision.org/tutorial/layers/deconvolution.html
- Input: ( N , C i n , H i n , W i n ) (N, C_{in}, H_{in}, W_{in}) (N,Cin,Hin,Win)
- Filter: ( C i n , C o u t / g r o u p , K h , K w ) (C_{in}, C_{out} / {group}, K_{h}, K_{w}) (Cin,Cout/group,Kh,Kw)
- Output: ( N , C o u t , H o u t , W o u t ) (N, C_{out}, H_{out}, W_{out}) (N,Cout,Hout,Wout)
1.2 Deconvolution Layer
https://caffe.berkeleyvision.org/doxygen/classcaffe_1_1DeconvolutionLayer.html
1.3 BilinearFiller
https://caffe.berkeleyvision.org/doxygen/classcaffe_1_1BilinearFiller.html
2. Deconvolution
https://support.huawei.com/enterprise/en/doc/EDOC1100234056/f1efbdcc/deconvolution
CANN Documentation
https://support.huawei.com/enterprise/en/ascend-computing/cann-pid-251168373
https://support.huawei.com/enterprise/zh/ascend-computing/cann-pid-251168373
CANN 5.0.4 Caffe, TensorFlow, and ONNX Operator Support 01
https://support.huawei.com/enterprise/en/doc/EDOC1100234056?idPath=23710424%7C251366513%7C22892968%7C251168373
2.1 General Restrictions
input shape: ( N y , C y , H y , W y ) (N_y, C_y, H_y, W_y) (Ny,Cy,Hy,Wy)
filter shape (k=kernel): ( N k , C k / g r o u p , H k , W k ) (N_k, C_{k}/group, H_k, W_k) (Nk,Ck/group,Hk,Wk)
output shape: ( N x , C x , H x , W x ) (N_x,C_x,H_x,W_x) (Nx,Cx,Hx,Wx)
- N x = N y , C x = C k , N k = C y N_x = N_y, C_x = C_k, N_k = C_y Nx=Ny,Cx=Ck,Nk=Cy
- W x = ( W y – 1 ) ∗ s t r i d e w – 2 ∗ p a d w + d i l a t i o n h ∗ ( W k – 1 ) + 1 W_x = (W_y \ – \ 1) * stride_{w} \ – \ 2 * pad_{w} \ + \ dilation_h * (W_k \ – \ 1) \ + \ 1 Wx=(Wy – 1)∗stridew – 2∗padw + dilationh∗(Wk – 1) + 1
- H x = ( H y – 1 ) ∗ s t r i d e h – 2 ∗ p a d h + d i l a t i o n w ∗ ( H k – 1 ) + 1 H_x = (H_y \ – \ 1) * stride_{h} \ – \ 2 * pad_{h} \ + \ dilation_w * (H_k \ – \ 1) \ + \ 1 Hx=(Hy – 1)∗strideh – 2∗padh + dilationw∗(Hk – 1) + 1
References
https://yongqiang.blog.csdn.net/
转载:https://blog.csdn.net/chengyq116/article/details/128292701