lululxvi / hpinn

hPINN: Physics-informed neural networks with hard constraints
Apache License 2.0
109 stars 35 forks source link

Code outdated #1

Open ArtemioA opened 2 years ago

ArtemioA commented 2 years ago

Sorry, there is currently a problem with your code. The version of the deepxde library that runs the "holography_main.py" file it is 0.9.1. Could you update the file so that it can run on the current version? or how could I fix this problem?

image

Thank you

lululxvi commented 2 years ago

It might be due to the following code

https://github.com/lululxvi/hpinn/blob/1a59c28dc52af26d719b6a6b2adf1f12f552fae4/holography/holography/pde.py#L71

The new version of DeepXDE doesn't allow the numpy X as the 3rd argument. It support PDE with 3 arguments via auxiliary_var_function, see https://github.com/lululxvi/deepxde/blob/master/examples/pinn_inverse/Lorenz_inverse_forced.py

XinweiCai commented 2 years ago

I wonder what "X" means and how to modify this code in latest deepXDE1.1.3? Thanks ! @lululxvi

lululxvi commented 2 years ago

X means the numpy version of the network input, which is a tensor.

To modify the code, you need to use auxiliary_var_function, see https://github.com/lululxvi/deepxde/blob/master/examples/pinn_inverse/Lorenz_inverse_forced.py

XinweiCai commented 2 years ago

Sorry Dr. Lu, I am still confused which function is the tensor X calculated from ? i.e. auxiliary_var_function = ? Can you give me detailed advise or exact codes? Thanks a lot!

lululxvi commented 2 years ago

X is the network input, a numpy array, not from any function.

You cannot "translate" the code line by line. You need to modify the logic a little bit.