convnet-aig
convnet-aig copied to clipboard
ValueError: expected 2D or 3D input (got 4D input)
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:

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
This code is developed for Python 3.6.5 PyTorch 0.3.1 CUDA 9.1 Please test with that setup.
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