Skip to content

Conversation

@vfdev-5
Copy link
Contributor

@vfdev-5 vfdev-5 commented Aug 10, 2020

Description:

Current implementation of F_t.center_crop, F_t.five_crop, F_t.ten_crop are not used by F.*_crop methods and F_t.five_crop, F_t.ten_crop seem to have a bug: https://github.com/pytorch/vision/pull/1615/files#diff-c0702298c1651f8c03d065692608f5dbR92 with indices 1 and 2.

  • Updated docs
  • Put warning in the code
  • Updated tests

- Updated docs
- Put warning in the code
- Updated tests
vfdev-5 added a commit to Quansight/vision that referenced this pull request Aug 10, 2020
- fixed bug with transforms using generated grid
- remains *_crop, blocked by pytorch#2568
- TODO: test_adjustments
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

I only have one minor comment, but which can be addressed in a follow-up PR

self.assertTrue(torch.equal(hflipped_img, hflipped_img_script))

def test_crop(self):
script_crop = torch.jit.script(F_t.crop)
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to change this to be F.crop ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I can change it in #2569

@fmassa fmassa merged commit c547e5c into pytorch:master Aug 11, 2020
@vfdev-5 vfdev-5 deleted the deprecate-tensor-x-crop-ops branch August 12, 2020 16:43
fmassa added a commit that referenced this pull request Aug 20, 2020
* Adapted almost all functional tensor tests on CPU/CUDA
- fixed bug with transforms using generated grid
- remains *_crop, blocked by #2568
- TODO: test_adjustments

* Apply suggestions from code review

Co-authored-by: Francisco Massa <[email protected]>

* Fixed issues according to review

* Split tests into two: cpu and cuda

* Updated test_adjustments to run on CPU and CUDA

Co-authored-by: Francisco Massa <[email protected]>
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
- Updated docs
- Put warning in the code
- Updated tests
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* Adapted almost all functional tensor tests on CPU/CUDA
- fixed bug with transforms using generated grid
- remains *_crop, blocked by pytorch#2568
- TODO: test_adjustments

* Apply suggestions from code review

Co-authored-by: Francisco Massa <[email protected]>

* Fixed issues according to review

* Split tests into two: cpu and cuda

* Updated test_adjustments to run on CPU and CUDA

Co-authored-by: Francisco Massa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants