Skip to content

Commit 1a1156c

Browse files
committed
Update FFT utility docstrings
Remove notes about fallback behavior from fft_utils_t.py following removal of PyTorch 1.8.0 compatibility code. Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
1 parent 421fb4c commit 1a1156c

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

monai/networks/blocks/fft_utils_t.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ def roll_1d(x: Tensor, shift: int, shift_dim: int) -> Tensor:
2828
2929
Returns:
3030
1d-shifted version of x
31-
32-
Note:
33-
This function is called when fftshift and ifftshift are not available in the running pytorch version
3431
"""
3532
shift = shift % x.size(shift_dim)
3633
if shift == 0:
@@ -55,9 +52,6 @@ def roll(x: Tensor, shift: list[int], shift_dims: list[int]) -> Tensor:
5552
5653
Returns:
5754
shifted version of x
58-
59-
Note:
60-
This function is called when fftshift and ifftshift are not available in the running pytorch version
6155
"""
6256
if len(shift) != len(shift_dims):
6357
raise ValueError(f"len(shift) != len(shift_dims), got f{len(shift)} and f{len(shift_dims)}.")
@@ -78,9 +72,6 @@ def fftshift(x: Tensor, shift_dims: list[int]) -> Tensor:
7872
7973
Returns:
8074
fft-shifted version of x
81-
82-
Note:
83-
This function is called when fftshift is not available in the running pytorch version
8475
"""
8576
shift = [0] * len(shift_dims)
8677
for i, dim_num in enumerate(shift_dims):
@@ -100,9 +91,6 @@ def ifftshift(x: Tensor, shift_dims: list[int]) -> Tensor:
10091
10192
Returns:
10293
ifft-shifted version of x
103-
104-
Note:
105-
This function is called when ifftshift is not available in the running pytorch version
10694
"""
10795
shift = [0] * len(shift_dims)
10896
for i, dim_num in enumerate(shift_dims):

0 commit comments

Comments
 (0)