I want to remove first row and first column from an intermediate activation map, but i get the following error–
RuntimeError: Need gradOutput of dimension 4 and gradOutput.size[2] == 5 but got gradOutput to be of shape: [20 x 512 x 4 x 4] at /Users/soumith/miniconda2/conda-bld/pytorch_1490984005896/work/torch/lib/THNN/generic/SpatialConvolutionMM.c:51
For example, if below is an intermediate activation map, I want to remove first row and column from each activation map –
(0 ,0 ,.,.) =
0  0  0  0
0  1  1  1
0  1  1  1
0  1  1  1
(0 ,1 ,.,.) =
0  0  0  0
0  1  1  1
0  1  1  1
0  1  1  1
(1 ,0 ,.,.) =
0  0  0  0
0  1  1  1
0  1  1  1
0  1  1  1
(1 ,1 ,.,.) =
0  0  0  0
0  1  1  1
0  1  1  1
0  1  1  1
[torch.FloatTensor of size 2x2x4x4]
I use x.resize_(2,2,3,3) to do that.