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

Commit d437245

Browse files
committed
Refactor
1 parent 57be019 commit d437245

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/model.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ end
9999
MarkovNeuralOperator(;
100100
ch = (1, 64, 64, 64, 64, 64, 1),
101101
modes = (24, 24),
102-
σ = gelu
103-
)
102+
σ = gelu)
104103
105104
Markov neural operator learns a neural operator with Fourier operators.
106105
With only one time step information of learning, it can predict the following few steps
@@ -142,33 +141,34 @@ The role of each channel size described as follow:
142141
julia> using NNlib
143142
144143
julia> MarkovNeuralOperator(;
145-
ch = (2, 64, 64, 64, 64, 64, 128, 1),
146-
modes = (16,),
144+
ch = (1, 64, 64, 64, 64, 64, 1),
145+
modes = (24, 24),
147146
σ = gelu)
148147
Chain(
149-
Dense(2 => 64), # 192 parameters
148+
Dense(1 => 64), # 128 parameters
150149
OperatorKernel(
151150
Dense(64 => 64), # 4_160 parameters
152-
OperatorConv(64 => 64, (16,), FourierTransform, permuted=false), # 65_536 parameters
151+
OperatorConv(64 => 64, (24, 24), FourierTransform, permuted=false), # 2_359_296 parameters
153152
NNlib.gelu,
154153
),
155154
OperatorKernel(
156155
Dense(64 => 64), # 4_160 parameters
157-
OperatorConv(64 => 64, (16,), FourierTransform, permuted=false), # 65_536 parameters
156+
OperatorConv(64 => 64, (24, 24), FourierTransform, permuted=false), # 2_359_296 parameters
158157
NNlib.gelu,
159158
),
160159
OperatorKernel(
161160
Dense(64 => 64), # 4_160 parameters
162-
OperatorConv(64 => 64, (16,), FourierTransform, permuted=false), # 65_536 parameters
161+
OperatorConv(64 => 64, (24, 24), FourierTransform, permuted=false), # 2_359_296 parameters
163162
NNlib.gelu,
164163
),
165164
OperatorKernel(
166165
Dense(64 => 64), # 4_160 parameters
167-
OperatorConv(64 => 64, (16,), FourierTransform, permuted=false), # 65_536 parameters
166+
OperatorConv(64 => 64, (24, 24), FourierTransform, permuted=false), # 2_359_296 parameters
168167
NNlib.gelu,
169168
),
170-
Dense(64 => 128), # 8_320 parameters
171-
) # Total: 16 arrays, 287_296 parameters, 2.097 MiB.
169+
Dense(64 => 1), # 65 parameters
170+
) # Total: 16 arrays, 9_454_017 parameters, 72.066 MiB.
171+
172172
```
173173
"""
174174
function MarkovNeuralOperator(;

0 commit comments

Comments
 (0)