Closed qpwodlsqp closed 3 years ago
I believe that should be fixed by modifying line 1 to Y = torch.zeros(x.shape[0], *h.shape).to(x)
to force agreement between devices and dtypes. Feel free to PR if that ends up working :)
confirmed that modification works and made a pull request
Describe the bug
In the line 23~29 of hybrid.py, the
Y
remains as CPU tensor after it is initialized even ifHybridNeuralDE
parameters and input tensor are placed on GPU. This causes an error in the line 29 when a model is placed on GPU. I am currently using torch==1.7.1 and torchdyn==0.2.2.1