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

Training from scratch error #28

Closed
kaushikb258 opened this issue Oct 9, 2019 · 2 comments
Closed

Training from scratch error #28

kaushikb258 opened this issue Oct 9, 2019 · 2 comments

Comments

@kaushikb258
Copy link

I tried training on cityscapes from scratch using 'python train.py' and get this error:

raise ValueError('Expected more than 1 value per channel when training, got input size {}'.format(size))
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1])

It is something in the _AtrousSpatialPyramidPoolingModule class in network/gscnn.py

img_features = self.img_conv(img_features)

@kaushikb258
Copy link
Author

Actually got training to work with the following fix in ASPP (replaced AdaptiveAvgPool with AvgPool):

self.img_pooling = nn.AvgPool2d(1) # nn.AdaptiveAvgPool2d(1)

But not sure why training is not working with AdaptiveAvgPool2d

@ly-mentaltity
Copy link

your batchsize is not even

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