def _IFFT3DGrad(_, grad): rsize = math_ops.cast( 1. / math_ops.cast(_FFTSizeForGrad(grad, 3), grad.dtype.real_dtype), grad.dtype) return spectral_ops.fft3d(grad) * rsize
def _IFFT3DGrad(_, grad): rsize = 1. / math_ops.cast(_FFTSizeForGrad(grad, 3), dtypes.float32) return spectral_ops.fft3d(grad) * math_ops.complex(rsize, 0.)