aai-institute / continuiti

Learning function operators with neural networks.
GNU Lesser General Public License v3.0
17 stars 2 forks source link

DeepONet should support arbitrary trunk/branch networks #71

Open samuelburbulla opened 4 months ago

samuelburbulla commented 4 months ago

Currently, we implement the DeepONet with fully connected networks for branch and trunk. Depending on the problem, one would like to replace these networks by more appropriate ones (e.g. CNNs as branch network).

Generalize DeepONet to take branch/trunk network in constructor. Per default, it should use DeepResidualNetwork.

JinglaiZheng commented 1 week ago

Thank you so much for your library. As a PhD student who regularly uses PINN, I intend to use continuiti to start my deeponet journey. My goal is very clear, to achieve PDE solution when the input of the branch network is in the form of images, such as spatially distributed material parameters, which I think can provide information in the form of images. Knowing that your library can implement CNN as a branch network, I started researching continuiti. Could you provide an example of CNN as a branch network or any other insights, thank you very much!

samuelburbulla commented 1 week ago

Hi Jinglai, thank you for reaching out! Our current implementation of DeepONet does not allow custom branch/trunk networks, but it can be extended to include this functionality - that's why this issue exists. Given your interest, I will prioritize this issue and we will open a PR in the coming days with an example. We welcome any feedback you have once you start using it.

JinglaiZheng commented 1 week ago

Thank you very much for your attention! I think that when vanilla CNN is introduced into DeepONet, advanced image processing networks such as U-net, TransUnet will be easily implemented, which will provide great progress for the development of the community. Looking forward to your example, thank you again!

samuelburbulla commented 3 days ago

Hi @JinglaiZheng,

I implemented the possibility to use custom branch/trunk network in DeepONet in #149.

See this test for an example on how to use it with a CNN as branch network.

Will this suit your needs?

Best, Samuel