You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a DeepONet architecture as proposed by Lu et al.
9
+
Create an (unstacked) DeepONet architecture as proposed by Lu et al.
6
10
arXiv:1910.03193
7
11
8
12
The model works as follows:
@@ -19,8 +23,42 @@ and `y` are the probing locations for the operator to be trained.
19
23
20
24
Both inputs `x` and `y` are multiplied together via dot product Σᵢ bᵢⱼ tᵢₖ.
21
25
26
+
You can set up this architecture in two ways:
27
+
28
+
1. By Specifying the architecture and all its parameters as given above. This always creates `Dense` layers for the branch and trunk net and corresponds to the DeepONet proposed by Lu et al.
29
+
30
+
2. By passing two architectures in the form of two Chain structs directly. Do this if you want more flexibility and e.g. use an RNN or CNN instead of simple `Dense` layers.
31
+
32
+
Strictly speaking, DeepONet does not imply either of the branch or trunk net to be a simple DNN. Usually though, this is the case which is why it's treated as the default case here.
33
+
22
34
```julia
23
-
model = DeepONet()
35
+
julia> model = DeepONet((32,64,72), (24,64,72))
36
+
DeepONet with
37
+
branch net: (Chain(Dense(32, 64), Dense(64, 72)))
38
+
Trunk net: (Chain(Dense(24, 64), Dense(64, 72)))
39
+
40
+
julia> model = DeepONet((32,64,72), (24,64,72), σ, tanh; init_branch=Flux.glorot_normal, bias_trunk=false)
0 commit comments