diff --git a/monai/transforms/spatial/array.py b/monai/transforms/spatial/array.py index 029cc27afc..571a640d29 100644 --- a/monai/transforms/spatial/array.py +++ b/monai/transforms/spatial/array.py @@ -3516,6 +3516,7 @@ def __call__(self, img: torch.Tensor, randomize: bool = True) -> torch.Tensor: self.randomize() if self._do_transform: + input_shape = img.shape[1:] target_shape = np.round(np.array(input_shape) * self.zoom_factor).astype(np.int_)