You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optim-wip: Add JIT support to all transforms & some image parameterizations (#821)
* Add JIT support to most transforms
* Additional improvements
* JIT support for `center_crop`.
* Improve some transform tests.
* Fix `RandomCrop` transform bug.
* Fix Mypy bug
* Interpolation based RandomScale & Other Improvements
* Replace Affine `RandomScale` with Interpolation based variant. Renamed old variant to `RandomScaleAffine`.
* `CenterCrop` & `center_crop` now use padding if the crop size is larger than the input dimensions.
* Add distributions support to both versions of `RandomScale`.
* Improve transform tests.
* NumSeqOrTensorType -> NumSeqOrTensorOrProbDistType
* Add `torch.distributions.distribution.Distribution` to `NumSeqOrTensorType` type hint.
* Add TransformationRobustness transform& fix bug
* Added `TransformationRobustness()` transform.
* Fixed bug with `center_crop` padding code, and added related tests to `center_crop` & `CenterCrop`.
* Fix center crop JIT tests
* Add asserts & more tests for RandomScale transforms
* Add JIT support for ToRGB, NaturalImage, & FFTImage
* Add JIT support `NaturalImage`, `FFTImage`, & `PixelImage`.
* Added proper JIT support for `ToRGB`.
* Improved `NaturalImage` & `FFTImage` tests, and test coverage.
* Add ImageParameterization Instance support for NaturalImage
* Added `ImageParameterization` instance support for `NaturalImage`. This improvement should make it easier to use parameterization enhancements like SharedImage, and will be helpful for custom parameterizations that don't use the standard input variable set (size, channels, batch, & init).
* Added asserts to verify `NaturalImage` parameterization inputs are instances or types of `ImageParameterization`.
* Support ToRGB with no named dimensions
This should make it easier to work with the ToRGB module as many PyTorch functions still don't work with named dimensions yet.
* Allow more than 4 channels in ToRGB
* The maximum of 4 channels isn't required as we ignore all channels after 3.
* Add assert check to `RandomScale`'s mode variable
The `linear` mode only supports 3D inputs, and `trilinear` only supports 5D inputs. RandomScale only uses 4D inputs, so only `nearest`, `bilinear`, `bicubic`, & `area` are supported.
* Change assert to check for unsupported RandomScale mode options
* Change `RandomRotation` type hint & add `RandomRotation` to `TransformationRobustness`
* Change `RandomRotation` type hint from `NumSeqOrTensorType` to `NumSeqOrTensorOrProbDistType`.
* Uncomment `RandomRotation` from `TransformationRobustness` & tests.
0 commit comments