You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
When I trying to use self-changed evaluate.py to evaluate my own dataset this error always came first. Do you know how could I change the code? I already add this : transforms.ToTensor()in evaluate.py and changed the code in dataset.py as return self.transform(self.x[index]), self.transform(self.y[index])
Is there any other way to eliminate the error?
The text was updated successfully, but these errors were encountered:
Ah, sorry about that. Currently, the code only works with CIFAR and MNIST.
I think the test_loader in this code is a tuple of train_loader and val_loader in your case because of this code.
So I think you can change that part of the code appropriately to make it work.
But I can finish the training with my own dataset in this code. So is there anything wrong I couldn't finish the prediction? Or is there any sepcific code to run the prediction?
The reason you could train your model with your own dataset without errors is because the training code only uses a training dataset and a validation dataset and it doesn't need a test dataset.
Although you need a test dataset to run evaluate.py, this code doesn't have the functionality to return test_dataset. And the reason it doesn't is because the ImageNet dataset doesn't have test labels. So, for your dataset, you need to modify the code to return your test dataset.
When I trying to use self-changed evaluate.py to evaluate my own dataset this error always came first. Do you know how could I change the code? I already add this :
transforms.ToTensor()
in evaluate.py and changed the code in dataset.py asreturn self.transform(self.x[index]), self.transform(self.y[index])
Is there any other way to eliminate the error?
The text was updated successfully, but these errors were encountered: