PredictiveIntelligenceLab / Physics-informed-DeepONets

266 stars 83 forks source link

Training data for Burger's equation #7

Closed bhaveshshrimali closed 2 years ago

bhaveshshrimali commented 2 years ago

Hi @sifanw094 @paraklas

Thanks a lot for putting together this repo. The examples are quite illustrative.

Would you be kind to provide the training data for Burger's equation, Burger.mat specifically ? I see that it uses chebfun and since I don't have access to Matlab, it would be really helpful if you can provide the training dataset. Thanks!

sifanexisted commented 2 years ago

Hi,

Please check the following link https://drive.google.com/drive/folders/1FL1vA76WX_b9XG3caiQ3kfElt9vVRzTm?usp=sharing.

Please let me know if this link or the data does not work for you.

Best, Sifan

bhaveshshrimali commented 2 years ago

Thanks Sifan! Really appreciate it. Has the vanilla-DeepONet version for Burger's equation been published? If not, would it be possible for you to share it with me privately?

Thanks, Bhavesh

bhaveshshrimali commented 2 years ago

@sifanw094 Could you point me to how you are saving the parameters for your deepONet model / PIDeepOnet model in Jax? I can see the way to load it but not the saving.. Thanks!

sifanexisted commented 2 years ago

Hello,

Sorry for the late reply.

Unfortunately we don't have the implementation of plain DeepONet for the example of Burger's equation. But it should be relatively easy to implement by removing the PDE loss and modifying the data loss and the corresponding data loader. As a reference, you may check the diffusion-reaction example where we have a plain DeepONet implementation.

As for storing the trained parameters, we use the following commands flat_params, _ = ravel_pytree(model.get_params(model.opt_state)) np.save('params.npy', flat_params) Here ravel_pytree gives a flattened parameters that you can simply use np.save to save them.

Hope this answer your question.

Best, Sifan

bhaveshshrimali commented 2 years ago

Perfect, Thanks @sifanw094 . I did implement a version based off of Diffusion-Reaction. I just wasn't sure of how to save and load these params. Thanks!