pytorch-randaugment
pytorch-randaugment copied to clipboard
view size is not compatible with input tensor's size and stride
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
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 :)