Closed tiffany61706 closed 5 years ago
Hi,
sorry for my late response.
The error is due to a refactoring of the torchvision datasets that came with PyTorch 1.0. The self.train_labels
and self.train_labels
attributes of CIFAR10 were replaced with self.targets
for consistency.
If you install the required Python modules with versions as listed in requirements.txt
, the example should run fine.
Especially
torch==0.4.1
torchvision==0.2.1
are relevant here.
I'm planning to put everything in line with the latest release of PyTorch soon.
@tiffany61706 Hi, Have you solved this problem? How can I run this code in PyTorch 1.0.
Hi! @tiffany61706 It is working on MNIST however I got a warning the following variables has renamed automatically. But for the CIFAR10 dataset, I replaced self.targets instead of self.train_labels and self.test_labels as well as self.data instead of self.train_data and self.test_data
Hi Thank you for sharing the code. I tried to run the cifar10 example; however, I got an error like the bottom. Is there something wrong in reading cifar10 dataset? (btw, I can run mnist example perfectly.)