def _FFT3DGrad(_, grad): size = math_ops.cast(_FFTSizeForGrad(grad, 3), grad.dtype) return spectral_ops.ifft3d(grad) * size
def _FFT3DGrad(_, grad): size = math_ops.cast(_FFTSizeForGrad(grad, 3), dtypes.float32) return spectral_ops.ifft3d(grad) * math_ops.complex(size, 0.)