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

view size is not compatible with input tensor's size and stride #26

Open
Srigowri opened this issue Feb 11, 2021 · 1 comment
Open

view size is not compatible with input tensor's size and stride #26

Srigowri opened this issue Feb 11, 2021 · 1 comment

Comments

@Srigowri
Copy link

I am trying to reproduce the output for
! python RandAugment/train.py -c confs/wresnet28x10_svhn_b256.yaml --save svhn_wres28x10.pth
The error is encountered in the metrics.py
correct_k = correct[:k].view(-1).float().sum(0)

Error message : view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces)

The same error arises while testing for cifar10

@XiaoFengbing
Copy link

hi, i meet the same problem as yours. Because the view function need the tensor address is continuous, if discontinuous, you should add the contiguous function before view .
Now I can run this code :)

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