We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e15e81f commit a7935eaCopy full SHA for a7935ea
torchvision/datasets/mnist.py
@@ -67,7 +67,7 @@ def __getitem__(self, index):
67
Returns:
68
tuple: (image, target) where target is index of the target class.
69
"""
70
- img, target = self.data[index], self.targets[index]
+ img, target = self.data[index], int(self.targets[index])
71
72
# doing this so that it is consistent with all other datasets
73
# to return a PIL Image
0 commit comments