alirezayazdani1 / SBINNs

Apache License 2.0
36 stars 25 forks source link

Setting search range for a trainable parameter in inverse ODE problem #4

Open khawlaoue opened 2 years ago

khawlaoue commented 2 years ago

Hello @alirezayazdani1 @lululxvi

I have an inverse ODE problem and I am trying to infer the value of one variable (based on Lorenz inverse problem) but I don´t get the true value of A (I created the synthetic data using the true value of A) , I wanted to set a search range like you did in the glucose-insulin code and using this part of the code : def get_variable(v): low, up = v * 0.2, v * 1.8 l = (up - low) / 2 return l * tf.tanh(tf.Variable(0, trainable=True, dtype=tf.float32)) + l + low

and using deepxde I get this error message : File "/usr/local/lib/python3.7/dist-packages/keras/optimizer_v2/utils.py", line 80, in filter_empty_gradients ([v.name for v in vars_with_empty_grads])) File "/usr/local/lib/python3.7/dist-packages/keras/optimizer_v2/utils.py", line 80, in ([v.name for v in vars_with_empty_grads]))

AttributeError: Tensor.name is meaningless when eager execution is enabled.

Do you know why this error comes up ? Thanks in advance !

lululxvi commented 2 years ago

Check the updated code at https://github.com/lu-group/sbinn