Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit 7d46aa7

Browse files
committed
Include docstring of DeepONet and NOMAD
1 parent 15368e7 commit 7d46aa7

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

docs/src/apis.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# APIs
22

3+
## Transforms
4+
5+
```@docs
6+
AbstractTransform
7+
```
8+
39
## Layers
410

511
### Operator convolutional layer
@@ -75,3 +81,20 @@ MarkovNeuralOperator
7581
```
7682

7783
Reference: [MNO2021](@cite)
84+
85+
---
86+
87+
### DeepONet
88+
89+
```@docs
90+
DeepONet
91+
NeuralOperators.construct_subnet
92+
```
93+
94+
### NOMAD
95+
96+
Nonlinear manifold decoders for operator learning
97+
98+
```@docs
99+
NOMAD
100+
```

src/NOMAD.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ struct NOMAD{T1, T2}
44
end
55

66
"""
7-
`NOMAD(architecture_approximator::Tuple, architecture_decoder::Tuple,
8-
act_approximator = identity, act_decoder=true;
9-
init_approximator = Flux.glorot_uniform,
10-
init_decoder = Flux.glorot_uniform,
11-
bias_approximator=true, bias_decoder=true)`
12-
`NOMAD(approximator_net::Flux.Chain, decoder_net::Flux.Chain)`
7+
NOMAD(architecture_approximator::Tuple, architecture_decoder::Tuple,
8+
act_approximator = identity, act_decoder=true;
9+
init_approximator = Flux.glorot_uniform,
10+
init_decoder = Flux.glorot_uniform,
11+
bias_approximator=true, bias_decoder=true)
12+
NOMAD(approximator_net::Flux.Chain, decoder_net::Flux.Chain)
1313
1414
Create a Nonlinear Manifold Decoders for Operator Learning (NOMAD) as proposed by Lu et al.
1515
arXiv:2206.03551
@@ -47,6 +47,7 @@ julia> model = NOMAD(approximator, decoder)
4747
NOMAD with
4848
Approximator net: (Chain(Dense(2 => 128), Dense(128 => 64)))
4949
Decoder net: (Chain(Dense(72 => 24), Dense(24 => 12)))
50+
```
5051
"""
5152
function NOMAD(architecture_approximator::Tuple, architecture_decoder::Tuple,
5253
act_approximator = identity, act_decoder = true;

src/Transform/fourier_transform.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function low_pass(ft::FourierTransform, 𝐱_fft::AbstractArray)
1414
return view(𝐱_fft, map(d -> 1:d, ft.modes)..., :, :) # [ft.modes..., in_chs, batch]
1515
end
1616

17-
const truncate_modes = low_pass
17+
truncate_modes(args...) = low_pass(args...)
1818

1919
function inverse(ft::FourierTransform, 𝐱_fft::AbstractArray)
2020
return real(ifft(𝐱_fft, 1:ndims(ft))) # [size(x_fft)..., out_chs, batch]

0 commit comments

Comments
 (0)