Skip to content

Commit df551a8

Browse files
jss367holly1238
andauthored
Update torchvision_tutorial.rst (#1007)
* Update torchvision_tutorial.rst * Update torchvision_tutorial.rst Co-authored-by: holly1238 <77758406+holly1238@users.noreply.github.com>
1 parent 3e6d1f4 commit df551a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intermediate_source/torchvision_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ training and evaluation, and will use the evaluation scripts from
6464
One note on the ``labels``. The model considers class ``0`` as background. If your dataset does not contain the background class, you should not have ``0`` in your ``labels``. For example, assuming you have just two classes, *cat* and *dog*, you can define ``1`` (not ``0``) to represent *cats* and ``2`` to represent *dogs*. So, for instance, if one of the images has both classes, your ``labels`` tensor should look like ``[1,2]``.
6565

6666
Additionally, if you want to use aspect ratio grouping during training
67-
(so that each batch only contains images with similar aspect ratio),
67+
(so that each batch only contains images with similar aspect ratios),
6868
then it is recommended to also implement a ``get_height_and_width``
6969
method, which returns the height and the width of the image. If this
7070
method is not provided, we query all elements of the dataset via

0 commit comments

Comments
 (0)