Skip to content

Optim-wip: Correct RandomScale transform #922

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

Closed

Conversation

ProGamerGov
Copy link
Contributor

@ProGamerGov ProGamerGov commented Apr 8, 2022

The RandomScale transform should actually be using F.interpolate rather than F.affine_grid & F.grid_sample, so I've changed it. The old version of RandomScale however seems to be useful enough to warrant keeping it, so I've renamed it to RandomScaleAffine.

  • The _rand_select function is no longer being used by any transforms, so I've deleted it.

  • Replaced default RandomScale transform with Interpolation based variant. Renamed the old variant to RandomScaleAffine.

  • Added JIT support for both versions of RandomScale. This required changing some of the type hints.

  • Add distributions support to both versions of RandomScale. Ludwig wanted this based off of his original PR.

  • Added more tests to improve testing coverage.

  • Changed NumSeqOrTensorType hint to NumSeqOrTensorOrProbDistType.

This PR contains code that was part of: #821, to make it easier to review.

@ProGamerGov
Copy link
Contributor Author

Closing this PR as it is no longer needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants