Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output = net(input,w,*arch) #4

Open
Devy001 opened this issue Sep 8, 2017 · 1 comment
Open

output = net(input,w,*arch) #4

Devy001 opened this issue Sep 8, 2017 · 1 comment

Comments

@Devy001
Copy link

Devy001 commented Sep 8, 2017

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.

@ajbrock
Copy link
Owner

ajbrock commented Sep 8, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants