Skip to content

Commit

Permalink
Fix typos in tv tutorial (pytorch#1357)
Browse files Browse the repository at this point in the history
Co-authored-by: holly1238 <77758406+holly1238@users.noreply.github.com>
  • Loading branch information
SeanChao and holly1238 authored Mar 31, 2021
1 parent 61d9d4b commit 3ea3439
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _static/torchvision_finetuning_instance_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@
" self.masks = list(sorted(os.listdir(os.path.join(root, \"PedMasks\"))))\n",
"\n",
" def __getitem__(self, idx):\n",
" # load images ad masks\n",
" # load images and masks\n",
" img_path = os.path.join(self.root, \"PNGImages\", self.imgs[idx])\n",
" mask_path = os.path.join(self.root, \"PedMasks\", self.masks[idx])\n",
" img = Image.open(img_path).convert(\"RGB\")\n",
Expand Down
2 changes: 1 addition & 1 deletion _static/tv-training-code.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, root, transforms):
self.masks = list(sorted(os.listdir(os.path.join(root, "PedMasks"))))

def __getitem__(self, idx):
# load images ad masks
# load images and masks
img_path = os.path.join(self.root, "PNGImages", self.imgs[idx])
mask_path = os.path.join(self.root, "PedMasks", self.masks[idx])
img = Image.open(img_path).convert("RGB")
Expand Down
2 changes: 1 addition & 1 deletion intermediate_source/torchvision_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Let’s write a ``torch.utils.data.Dataset`` class for this dataset.
self.masks = list(sorted(os.listdir(os.path.join(root, "PedMasks"))))
def __getitem__(self, idx):
# load images ad masks
# load images and masks
img_path = os.path.join(self.root, "PNGImages", self.imgs[idx])
mask_path = os.path.join(self.root, "PedMasks", self.masks[idx])
img = Image.open(img_path).convert("RGB")
Expand Down

0 comments on commit 3ea3439

Please sign in to comment.