Skip to content

Commit 3ea3439

Browse files
SeanChaoholly1238
andauthored
Fix typos in tv tutorial (pytorch#1357)
Co-authored-by: holly1238 <[email protected]>
1 parent 61d9d4b commit 3ea3439

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

_static/torchvision_finetuning_instance_segmentation.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@
14481448
" self.masks = list(sorted(os.listdir(os.path.join(root, \"PedMasks\"))))\n",
14491449
"\n",
14501450
" def __getitem__(self, idx):\n",
1451-
" # load images ad masks\n",
1451+
" # load images and masks\n",
14521452
" img_path = os.path.join(self.root, \"PNGImages\", self.imgs[idx])\n",
14531453
" mask_path = os.path.join(self.root, \"PedMasks\", self.masks[idx])\n",
14541454
" img = Image.open(img_path).convert(\"RGB\")\n",

_static/tv-training-code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, root, transforms):
2525
self.masks = list(sorted(os.listdir(os.path.join(root, "PedMasks"))))
2626

2727
def __getitem__(self, idx):
28-
# load images ad masks
28+
# load images and masks
2929
img_path = os.path.join(self.root, "PNGImages", self.imgs[idx])
3030
mask_path = os.path.join(self.root, "PedMasks", self.masks[idx])
3131
img = Image.open(img_path).convert("RGB")

intermediate_source/torchvision_tutorial.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Let’s write a ``torch.utils.data.Dataset`` class for this dataset.
122122
self.masks = list(sorted(os.listdir(os.path.join(root, "PedMasks"))))
123123
124124
def __getitem__(self, idx):
125-
# load images ad masks
125+
# load images and masks
126126
img_path = os.path.join(self.root, "PNGImages", self.imgs[idx])
127127
mask_path = os.path.join(self.root, "PedMasks", self.masks[idx])
128128
img = Image.open(img_path).convert("RGB")

0 commit comments

Comments
 (0)