You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: intermediate_source/torchvision_tutorial.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ If your model returns the above methods, they will make it work for both
56
56
training and evaluation, and will use the evaluation scripts from
57
57
``pycocotools``.
58
58
59
-
One note on the ``labels``. The model expects class ``0`` to be always the 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*. If in your image you have booth classes, your ``labels`` tensor should look like ``[1,2]``.
59
+
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 booth classes, your ``labels`` tensor should look like ``[1,2]``.
60
60
61
61
Additionally, if you want to use aspect ratio grouping during training
62
62
(so that each batch only contains images with similar aspect ratio),
0 commit comments