def _FFT2DGrad(_, grad): size = math_ops.cast(_FFTSizeForGrad(grad, 2), grad.dtype) return spectral_ops.ifft2d(grad) * size
def _FFT2DGrad(_, grad): size = math_ops.cast(_FFTSizeForGrad(grad, 2), dtypes.float32) return spectral_ops.ifft2d(grad) * math_ops.complex(size, 0.)