-
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
Replaced to_tensor() with pil_to_tensor() + convert_image_dtype() #4452
Replaced to_tensor() with pil_to_tensor() + convert_image_dtype() #4452
Conversation
Detection training logs with these changes: |
Segmentation training logs with these changes: |
@prabhat00155 Can you provide validation runs for pretrained models? We need to ensure that before/after all metrics remain the same for all models. |
fasterrcnn_resnet50_fpn:
With changes:
|
fcn_resnet50:
With changes:
|
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.
LGTM! I love to see to_tensor()
go. Thanks Prabhat. :)
@prabhat00155 Some This is the class form not the functional part of the implementation. If you search for What that intentionally left out? It would be awesome if we could replace them as well. |
Okay, will do that. |
Might require additional validation runs. Happy to review the PR if you tag me. |
Here is the PR: #4481 |
…ype() (#4452) Reviewed By: datumbox Differential Revision: D31268041 fbshipit-source-id: c1300d28c4474a95db7fe902bfe694e08ae7db39
Hey @prabhat00155, thanks for doing this! Do we also have plan for replacing all the |
@sallysyw It has already been replaced on a previous PR. |
ohhh right! My bad. Thanks for pointing it out. |
This PR replaces uses of
to_tensor()
in reference scripts with a combination ofpil_to_tensor()
+convert_image_dtype()
.to_tensor()
has some implicit assumptions and is unclear with a number of issues reported with it.cc @datumbox