pnnl / neuromancer

Pytorch-based framework for solving parametric constrained optimization problems, physics-informed system identification, and parametric model predictive control.
https://pnnl.github.io/neuromancer/
Other
913 stars 120 forks source link

PINN example Part 1 - device error #177

Closed drgona closed 3 months ago

drgona commented 3 months ago

I am getting an error in the current Part 1 PINN example.

https://colab.research.google.com/github/pnnl/neuromancer/blob/master/examples/PDEs/Part_1_PINN_DiffusionEquation.ipynb#scrollTo=1HFK0cBiST1t&line=1&uniqifier=1

the training breaks at best_model = trainer.train() due to mismatch in devices.

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat1 in method wrapper_CUDA_addmm)

brunopjacob commented 3 months ago

Fixed in https://github.com/pnnl/neuromancer/pull/191.