Skip to content

Commit 31d7101

Browse files
Merge pull request #681 from Glenn-Su/patch-1
更正错别字
2 parents 8a2d563 + 12cef12 commit 31d7101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/2.0/tutorials/beginner/basics/data_tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def __len__(self):
147147
```
148148
### __getitem__
149149

150-
函数 `__getitem__` 从数据集中给定的索引 ``idx`` 处加载并返回一个样本。根据索引可以确定图像在硬盘上的位置,用 ``read_image`` 将其转换为tensor,从 ``self.img_labels`` 的csv数据中获取相应的标签,最对它们调用 transform 函数(如果适用),并返回tensor图像和相应的标签的元组。
150+
函数 `__getitem__` 从数据集中给定的索引 ``idx`` 处加载并返回一个样本。根据索引可以确定图像在硬盘上的位置,用 ``read_image`` 将其转换为tensor,从 ``self.img_labels`` 的csv数据中获取相应的标签,再对它们调用 transform 函数(如果适用),并返回tensor图像和相应的标签的元组。
151151

152152
```py
153153
def __getitem__(self, idx):

0 commit comments

Comments
 (0)