-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
lazy RandAffine
has no effect
#6773
Labels
bug
Something isn't working
Comments
thanks for testing and reporting @function2-llx, that's a good point, the bug was not detected earlier because we used the same transform instance to verify lazy/non-lazy consistency in this case MONAI/tests/test_rand_affine.py Lines 145 to 148 in e2fa53b
|
wyli
added a commit
that referenced
this issue
Jul 28, 2023
Fixes #6773. ### Description Call `rand_affine_grid()` once before call `rand_affine_grid.get_transformation_matrix()`, since its documented as "Get the most recently applied transformation matrix", or the `.affine` attribute will not be set. Also, set `randomize=False` here since randomization if performed in the beginning of the function. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. --------- Signed-off-by: function2 <function2-llx@outlook.com> Co-authored-by: Wenqi Li <831580+wyli@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using
RandAffine
withlazy=True
, it does not perform any transform at all.To Reproduce
Actual Result
The text was updated successfully, but these errors were encountered: