Skip to content

Commit 6b1a387

Browse files
martingoodsonsvekars
authored andcommitted
Change obsolete read_image to decode_image in data_tutorial.py (pytorch#3586)
Corrected quoted code so it reflects the code at line 137. ## Description One word change, fixing documentation. The example previously did not reflect the code it quoted. cc @albanD @jbschlosser Co-authored-by: Svetlana Karslioglu <[email protected]>
1 parent 2f6cc3e commit 6b1a387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beginner_source/basics/data_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def __len__(self):
190190

191191
def __getitem__(self, idx):
192192
img_path = os.path.join(self.img_dir, self.img_labels.iloc[idx, 0])
193-
image = read_image(img_path)
193+
image = decode_image(img_path)
194194
label = self.img_labels.iloc[idx, 1]
195195
if self.transform:
196196
image = self.transform(image)

0 commit comments

Comments
 (0)