fn
col2im_f32
void col2im_f32(const float * cols, float * dx, int C, int H, int W, int KH, int KW, int OH, int OW, int stride_h, int stride_w, int pad_h, int pad_w, int dilation_h, int dilation_w)Single-precision 2-D col2im fold (gradient transform).
Adjoint of im2col_f32: scatters each receptive-field column of cols
back into the corresponding input positions of , accumulating by
addition where windows overlap. Used in the conv2d backward pass.
Parameters
colsconst float*Column matrix, shape .
dxfloat*Output gradient tensor, shape ; must be zeroed by the caller before this call.
C, H, W, KH, KW, OH, OWintShape parameters.
stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_wintMatch the forward convolution.
Notes
Overlapping receptive fields accumulate by sum — this is the mathematically correct adjoint of im2col under any stride / dilation.