-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add example for v2 wrapping for custom datasets #7514
Conversation
# | ||
# If both :class:`~torchvision.datapoints.BoundingBox`'es and :class:`~torchvision.datapoints.Mask`'s are included in | ||
# the sample, ``torchvision.transforms.v2`` will transform them both. Meaning, if you don't need both, dropping or | ||
# at least not wrapping the obsolete parts, can lead to a significant performance boost. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not wrapping the obsolete parts
This works due to the heuristic we have in place. I wonder if we should link to the explanation here or refrain from it to avoid confusion.
@@ -101,6 +164,7 @@ | |||
# Since for most operations involving datapoints, it cannot be safely inferred whether the result should retain the | |||
# datapoint type, we choose to return a plain tensor instead of a datapoint (this might change, see note below): | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flake8
was complaining here. No idea why this wasn't the case before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Philip
Hey @pmeier! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Reviewed By: vmoens Differential Revision: D45183670 fbshipit-source-id: 22d4aee4bccb08249bd041448bdaf1205c55c57c
Addresses #6753 (comment).
cc @praxxus11