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

ValueError: expected 2D or 3D input (got 4D input) #1

Open
MrLinNing opened this issue Sep 27, 2018 · 2 comments
Open

ValueError: expected 2D or 3D input (got 4D input) #1

MrLinNing opened this issue Sep 27, 2018 · 2 comments

Comments

@MrLinNing
Copy link

Hello Andreas Veit:

My PyTorch version is 4.0 , cuda is 9.0 and python is 3.5.
I run the code, but I find this problem.

 python train.py

problem:
image

I think the problem is ResNet110_cifar() function in convnet_aig.py file. I don't know how to fix the debug, can you help me? Thanks. @andreasveit

@andreasveit
Copy link
Owner

This code is developed for
Python 3.6.5
PyTorch 0.3.1
CUDA 9.1
Please test with that setup.

@irwinherrmann
Copy link

For Pytorch 4.1, the batchnorm should be 2d instead of 1d.

Change here: https://github.com/andreasveit/convnet-aig/blob/master/convnet_aig.py#L80

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

3 participants