Skip to content

Commit

Permalink
fix lazy rand affine
Browse files Browse the repository at this point in the history
  • Loading branch information
function2-llx committed Jul 25, 2023
1 parent 2800a76 commit 9ddacf2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions monai/transforms/spatial/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2523,6 +2523,7 @@ def __call__(
img = convert_to_tensor(img, track_meta=get_track_meta())
if lazy_:
if self._do_transform:
self.rand_affine_grid(sp_size, randomize=False, lazy=True)
affine = self.rand_affine_grid.get_transformation_matrix()
else:
affine = convert_to_dst_type(torch.eye(len(sp_size) + 1), img, dtype=self.rand_affine_grid.dtype)[0]
Expand Down

0 comments on commit 9ddacf2

Please sign in to comment.