SMASH
SMASH copied to clipboard
output = net(input,w,*arch)
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
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.
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.