Commit b1f6c9e
authored
[prototype] Optimize and clean up all affine methods (#6945)
* Clean up `_get_inverse_affine_matrix` and `_compute_affine_output_size`
* Optimize `_apply_grid_transform`
* Cleanup `_assert_grid_transform_inputs`
* Fix bugs on `_pad_with_scalar_fill` & `crop_mask` and port `crop_image_tensor`
* Call directly `_pad_with_scalar_fill`
* Fix linter
* Clean up `center_crop_image_tensor`
* Fix comments.
* Fixing rounding issues.
* Bumping tolerance for rotate which is unrelated to this PR.
* Fix tolerance threshold for RandomPerspective.
* Clean up `_affine_grid` and `affine_image_tensor`
* Clean up `rotate_image_tensor`
* Fixing linter
* Address code-review comments.1 parent de350bc commit b1f6c9e
File tree
3 files changed
+265
-30
lines changed- test
- torchvision/prototype/transforms/functional
3 files changed
+265
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
918 | | - | |
| 918 | + | |
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
| |||
0 commit comments