diff --git a/python/paddle/tensor/fft.py b/python/paddle/tensor/fft.py index b60d83d7dd513..4a541c7ff6eeb 100644 --- a/python/paddle/tensor/fft.py +++ b/python/paddle/tensor/fft.py @@ -47,7 +47,7 @@ def _check_fft_axes(x, axes): "Length of fft axes should not be larger than the rank of input. " "Received, len of axes: {}, rank of x: {}".format(len(axes), ndim)) for axis in axes: - if not isinstance(size, int) or axis < -ndim or axis >= ndim: + if not isinstance(axis, int) or axis < -ndim or axis >= ndim: raise ValueError("FFT axes {} contains invalid value ({})".format( axes, axis))