SMASH icon indicating copy to clipboard operation
SMASH copied to clipboard

output = net(input,w,*arch)

Open Devy001 opened this issue 7 years ago • 1 comments

Hi, I changed the input data to search face recognition network, the input size is (3,112,96),when i run the output = net(input,w,*arch) of train_fn() function in the code of train.py it has displayed that:

RuntimeError: Given input size: (256x28x24). Calculated output size: (256x1x0). Output size is too small at /opt/conda/conda-bld/pytorch_1502001039157/work/torch/lib/THCUNN/generic/SpatialAveragePooling.cu:63 image

I know i should modified the input size of the SMASH network,but I can not find it, How should I change it? Thank you.

Devy001 avatar Sep 08 '17 03:09 Devy001

You don't need to modify the input size, just change the pooling size on line 997 and line 1193 to be the appropriate size for your network. The current version is lazy and assumes a square image; if you replace out.size(2) with (out.size(2),out.size(3)) it should resolve the issue. I'll update the source when I get a chance to test it out and make the 0.20 update.

ajbrock avatar Sep 08 '17 03:09 ajbrock