deepxde icon indicating copy to clipboard operation
deepxde copied to clipboard

Google Colab error

Open kayanjaandrew opened this issue 1 year ago • 2 comments

I am a newbie to DeepXDE. I am applying deepxde and PyTorch backend (from deepxde.backend import torch) to solve an ODE(SIR model) inverse problem. When I use my computer CPU to train the model, everything works fine when it comes to checking the parameter estimates using : estimated_beta = beta.detach().numpy() estimated_alpha = alpha.detach().numpy() But when i transfer the program to Google Colab, i get the error "'RefVariable' object has no attribute 'detach'"

kayanjaandrew avatar Sep 21 '23 07:09 kayanjaandrew

Solved the problem by setting the right backend.

kayanjaandrew avatar Sep 22 '23 03:09 kayanjaandrew

@kayanjaandrew , how to change the backend to "pytorch" in google colab?! We do the following installation first:

"pip install DeepXDE import deepxde as dde " and then what?

Thanks

AmirNoori68 avatar Jan 02 '24 08:01 AmirNoori68