Cuda Numpy operations in custom Modules
Hi, Just converting the model and input to cuda results in “RuntimeError: numpy conversion for FloatTensor is not supported” error at “result = abs(rfft2(numpy_input)) line”. <SCODE>class BadFFTFunction(Function):
    
    def forward(self, input):
        numpy_input = input.numpy()
        result = abs(rfft2(numpy_input))
        return torch.FloatTensor(result)
    
    def backward(self, grad_output):
        numpy_go = grad_output.numpy()
        result = irfft2(numpy_go)
        return torch.FloatTensor(result)<ECODE>
Vijay_Rengarajan
apaszke
Okay, thanks! I will check.
Vijay_Rengarajan