|
99 | 99 | MarkovNeuralOperator(; |
100 | 100 | ch = (1, 64, 64, 64, 64, 64, 1), |
101 | 101 | modes = (24, 24), |
102 | | - σ = gelu |
103 | | - ) |
| 102 | + σ = gelu) |
104 | 103 |
|
105 | 104 | Markov neural operator learns a neural operator with Fourier operators. |
106 | 105 | 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: |
142 | 141 | julia> using NNlib |
143 | 142 |
|
144 | 143 | 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), |
147 | 146 | σ = gelu) |
148 | 147 | Chain( |
149 | | - Dense(2 => 64), # 192 parameters |
| 148 | + Dense(1 => 64), # 128 parameters |
150 | 149 | OperatorKernel( |
151 | 150 | 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 |
153 | 152 | NNlib.gelu, |
154 | 153 | ), |
155 | 154 | OperatorKernel( |
156 | 155 | 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 |
158 | 157 | NNlib.gelu, |
159 | 158 | ), |
160 | 159 | OperatorKernel( |
161 | 160 | 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 |
163 | 162 | NNlib.gelu, |
164 | 163 | ), |
165 | 164 | OperatorKernel( |
166 | 165 | 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 |
168 | 167 | NNlib.gelu, |
169 | 168 | ), |
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 | +
|
172 | 172 | ``` |
173 | 173 | """ |
174 | 174 | function MarkovNeuralOperator(; |
|
0 commit comments