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

Commit 77c3da0

Browse files
committed
update manual
1 parent af11253 commit 77c3da0

File tree

2 files changed

+40
-19
lines changed

2 files changed

+40
-19
lines changed

docs/src/index.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,36 @@ Documentation for [NeuralOperators](https://github.com/foldfelis/NeuralOperators
99
```@index
1010
```
1111

12-
```@autodocs
13-
Modules = [NeuralOperators]
12+
## Layers
13+
14+
### Spectral convolutional layer
15+
16+
```math
17+
F(s) = \mathcal{F} \{ v(x) \} \\
18+
F'(s) = g(F(s)) \\
19+
v'(x) = \mathcal{F}^{-1} \{ F'(s) \}
20+
```
21+
22+
where ``v(x)`` and ``v'(x)`` denotes input and output function, ``\mathcal{F} \{ \cdot \}``, ``\mathcal{F}^{-1} \{ \cdot \}`` are Fourier transform, inverse Fourier transform, respectively. Function ``g`` is a linear transform for lowering Fouier modes.
23+
24+
```@docs
25+
SpectralConv
26+
```
27+
28+
Reference: [Fourier Neural Operator for Parametric Partial Differential Equations](https://arxiv.org/abs/2010.08895)
29+
30+
---
31+
32+
### Fourier operator layer
33+
34+
```math
35+
v_{t+1}(x) = \sigma(W v_t(x) + \mathcal{K} \{ v_t(x) \} )
1436
```
37+
38+
where ``v_t(x)`` is the input function for ``t``-th layer and ``\mathcal{K} \{ \cdot \}`` denotes spectral convolutional layer. Activation function ``\sigma`` can be arbitrary non-linear function.
39+
40+
```@docs
41+
FourierOperator
42+
```
43+
44+
Reference: [Fourier Neural Operator for Parametric Partial Differential Equations](https://arxiv.org/abs/2010.08895)

src/fourier.jl

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@ end
2727
init=c_glorot_uniform, permuted=false, T=ComplexF32
2828
)
2929
30-
## SpectralConv
30+
## Arguments
3131
32-
* ``v(x)``: input
33-
* ``F``, ``F^{-1}``: Fourier transform, inverse fourier transform
34-
* ``L``: linear transform on the lower Fouier modes.
35-
36-
``v(x)`` -> ``F`` -> ``L`` -> ``F^{-1}``
32+
* `ch`: Input and output channel size, e.g. `64=>64`.
33+
* `modes`: The Fourier modes to be preserved.
34+
* `σ`: Activation function.
3735
3836
## Example
3937
@@ -109,18 +107,11 @@ end
109107
"""
110108
FourierOperator(ch, modes, σ=identity; permuted=false)
111109
112-
## FourierOperator
113-
114-
* ``v(x)``: input
115-
* ``F``, ``F^{-1}``: Fourier transform, inverse fourier transform
116-
* ``L``: linear transform on the lower Fouier modes
117-
* ``D``: local linear transform
110+
## Arguments
118111
119-
```
120-
┌ F -> L -> F¯¹ ┐
121-
v(x) -> ┤ ├ -> + -> σ
122-
└ D ┘
123-
```
112+
* `ch`: Input and output channel size for spectral convolution, e.g. `64=>64`.
113+
* `modes`: The Fourier modes to be preserved for spectral convolution.
114+
* `σ`: Activation function.
124115
125116
## Example
126117

0 commit comments

Comments
 (0)