Skip to content

Commit 9ddacf2

Browse files
committed
fix lazy rand affine
1 parent 2800a76 commit 9ddacf2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

monai/transforms/spatial/array.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,6 +2523,7 @@ def __call__(
25232523
img = convert_to_tensor(img, track_meta=get_track_meta())
25242524
if lazy_:
25252525
if self._do_transform:
2526+
self.rand_affine_grid(sp_size, randomize=False, lazy=True)
25262527
affine = self.rand_affine_grid.get_transformation_matrix()
25272528
else:
25282529
affine = convert_to_dst_type(torch.eye(len(sp_size) + 1), img, dtype=self.rand_affine_grid.dtype)[0]

0 commit comments

Comments
 (0)