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.
2 parents 9378feb + 0332624 commit e37323dCopy full SHA for e37323d
torchvision/datasets/coco.py
@@ -51,6 +51,9 @@ def __getitem__(self, index):
51
path = coco.loadImgs(img_id)[0]['file_name']
52
53
img = Image.open(os.path.join(self.root, path)).convert('RGB')
54
+ if self.transform is not None:
55
+ img = self.transform(img)
56
+
57
if self.target_transform is not None:
58
target = self.target_transform(target)
59
0 commit comments