-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Image ToTensor operator - GPU support, 3D/4D inputs #13837
Image ToTensor operator - GPU support, 3D/4D inputs #13837
Conversation
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.
should we unify the unit test file name of cpu and gpu
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.
Some high-level issues with this PR:
Make to_tensor as operator. No contribution to gradient.
- based on the description, this PR seems to assume that
to_tensor
is not yet an operator. but it is!.to_tensor
is an operator in theimage
namespace. - the unnecessary file movement should be reverted so that edit history of the code are best preserved. suggest to make edits in the existing files.
456a6f5
to
a793a0d
Compare
@stu1130 - Thanks, I have addressed your comments. Can you please take a look? |
@szha
|
From first glance there doesn't seem to be that many changes to the extent that it would cause confusion. Let's at least give it a try. |
@sandeep-krishnamurthy Can you keep the ops in the original files for sake of easier review? For now I get lost what has actually been modifed in addtion to the original implementation. If you find the name of the file not appropriate, you can file a separate PR to move it and notify me that the new PR is purely to re-org code. |
Yes. I was working on moving it back per @szha suggestion. |
a793a0d
to
4ec2c1f
Compare
@zhreshold , @szha - I moved back all changes to same files as per suggestion. Can you please take a look at this PR? Thanks! |
b28e244
to
0d7d822
Compare
0d7d822
to
7bcc927
Compare
@szha - I have addressed your comments. Can you please take a look at this PR? Thanks. |
3a27707
to
63ae86c
Compare
cc6daba
to
a770ce7
Compare
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
* Add CPU implementation of ToTensor * Add tests for cpu * Add gpu implementation and tests * Fix lint issues * Cleanup includes * Move back changes to original image operators files * Add 4D example * resolve merge conflicts * Fix failing tests * parallelize on channel in kernel launch
* Add CPU implementation of ToTensor * Add tests for cpu * Add gpu implementation and tests * Fix lint issues * Cleanup includes * Move back changes to original image operators files * Add 4D example * resolve merge conflicts * Fix failing tests * parallelize on channel in kernel launch
* Add CPU implementation of ToTensor * Add tests for cpu * Add gpu implementation and tests * Fix lint issues * Cleanup includes * Move back changes to original image operators files * Add 4D example * resolve merge conflicts * Fix failing tests * parallelize on channel in kernel launch
Description
Make to_tensor as operator. No contribution to gradient.Add description, InPlaceOption and other parameters during operator registration.Background
We can enable users to fuse transformation operators with network graph and export it. This end to end network with transforms + network will greatly simplify inference deployment.
Related PR for normalize transformation - #13802
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
@apeforest @stu1130 @zhreshold @nswamy - For review