Skip to content

Let LinearTransformation return datapoints instead of tensors #7244

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

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

NicolasHug
Copy link
Member

@NicolasHug NicolasHug commented Feb 14, 2023

For the same reason as for Normalize or RandomPhotometricDistort done in #7113: the assumption about the range of the values is embedded in the dtype of the underlying tensor, not in its [sub]class. On top of that, Tensors are treated the same as Images, so returning a Tensor doesn't add any "security layer".

I'm not adding tests because the relevant test is in #7238, which properly passes with this PR (checked locally).

cc @vfdev-5 @bjuncek @pmeier

Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, but otherwise LGTM. Thanks Nicolas!

@NicolasHug NicolasHug merged commit d4575e5 into pytorch:main Feb 14, 2023
@pmeier pmeier deleted the linearrrrrrr branch February 14, 2023 13:39
@pmeier pmeier restored the linearrrrrrr branch February 14, 2023 13:39
facebook-github-bot pushed a commit that referenced this pull request Mar 28, 2023
#7244)

Reviewed By: vmoens

Differential Revision: D44416585

fbshipit-source-id: 8f61172e676563ad7eefbdb294eb76dab6dee2eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants