weiaicunzai / pytorch-cifar100

Practice on cifar100(ResNet, DenseNet, VGG, GoogleNet, InceptionV3, InceptionV4, Inception-ResNetv2, Xception, Resnet In Resnet, ResNext,ShuffleNet, ShuffleNetv2, MobileNet, MobileNetv2, SqueezeNet, NasNet, Residual Attention Network, SENet, WideResNet)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to execute code on test set

rsundar96 opened this issue · comments

Hi,

I am trying to test the model on Google Colab using the command you have put up in your README.md file ( !python test.py -net vgg16 -weights ./checkpoint/vgg16/Tuesday_04_August_2020_15h_05m_17s/vgg16-171-best.pth). However, I seem to be running into this issue

Screenshot 2020-08-04 at 18 07 46

To my understanding, this issue only comes up when the model is on the GPU but data is on the CPU. I checked the code to see what the issue could be but found that not only is the model being loaded to the Colab GPU, but also the labels and images. I'm not sure if this problem arises due to it being executed on Google Colab (I do not have access to a GPU locally). Would appreciate your help regarding this.

Issue has been resolved locally. Will provide a fix to resolve issue on test.py. Image and Label need to be loaded onto the GPU.