Skip to content

Commit

Permalink
[Hackathon 6th Code Camp No.15] support neuraloperator docs (PaddlePa…
Browse files Browse the repository at this point in the history
…ddle#917)

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator

* add-neuraloperator-doc

* add-neuraloperator-doc

* move-paddle-harmonics

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-doc

* add-neuraloperator-docs

* add-neuraloperator-docs

* add-neuraloperator-docs

* add-neuraloperator-doc

* add-neuraloperator-doc
  • Loading branch information
Yang-Changhui authored Jun 24, 2024
1 parent cc43efa commit 53c4ede
Show file tree
Hide file tree
Showing 8 changed files with 684 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/zh/examples/earthformer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
=== "模型训练命令"

``` sh
# ICAR-ENSO 数据预训练模型
# ICAR-ENSO 数据模型训练
python examples/earthformer/earthformer_enso_train.py
# SEVIR 数据集预训练模型
# SEVIR 数据模型训练
python examples/earthformer/earthformer_sevir_train.py

```
Expand Down Expand Up @@ -74,7 +74,7 @@ EarthFormer 原代码中训练了 ICAR-ENSO 数据集中海面温度 (sst) 和 S

### 2.1 ICAR-ENSO 和 SEVIR 模型的训练、推理过程

模型预训练阶段是基于随机初始化的网络权重对模型进行训练,如下图所示,其中 $[x_{i}]_{i=1}^{T}$ 表示长度为 $T$ 时空序列的输入气象数据,$[y_{i}]_{i=1}^{K}$ 表示预测未来 $K$ 步的气象数据,$[y_{i_True}]_{i=1}^{K}$ 表示未来 $K$ 步的真实数据,如海面温度数据和云总降水量数据。最后网络模型预测的输出和真值计算 mse 损失函数。
模型预训练阶段是基于随机初始化的网络权重对模型进行训练,如下图所示,其中 $[x_{i}]_{i=1}^{T}$ 表示长度为 $T$ 时空序列的输入气象数据,$[y_{T+i}]_{i=1}^{K}$ 表示预测未来 $K$ 步的气象数据,$[y_{T+i_true}]_{i=1}^{K}$ 表示未来 $K$ 步的真实数据,如海面温度数据和云总降水量数据。最后网络模型预测的输出和真值计算 mse 损失函数。

<figure markdown>
![earthformer-pretraining](https://paddle-org.bj.bcebos.com/paddlescience/docs/earthformer/earthformer-pretrain.png){ loading=lazy style="margin:0 auto;height:70%;width:70%"}
Expand Down
673 changes: 673 additions & 0 deletions docs/zh/examples/neuraloperator.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ nav:
- Volterra_IDE: zh/examples/volterra_ide.md
- NLSMB: zh/examples/nlsmb.md
- XPINN: zh/examples/xpinns.md
- NeuralOperator: zh/examples/neuraloperator.md
- 技术科学(AI for Technology):
- 流体:
- AMGNet: zh/examples/amgnet.md
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import paddle
from paddle import nn

from ppsci.paddle_harmonics.sht import InverseRealSHT
from ppsci.arch.paddle_harmonics.sht import InverseRealSHT


class GaussianRandomFieldS2(nn.Layer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
import paddle.fft
import paddle.nn as nn

from ppsci.paddle_harmonics.legendre import _precompute_dlegpoly
from ppsci.paddle_harmonics.legendre import _precompute_legpoly
from ppsci.paddle_harmonics.quadrature import clenshaw_curtiss_weights
from ppsci.paddle_harmonics.quadrature import legendre_gauss_weights
from ppsci.paddle_harmonics.quadrature import lobatto_weights
from ppsci.arch.paddle_harmonics.legendre import _precompute_dlegpoly
from ppsci.arch.paddle_harmonics.legendre import _precompute_legpoly
from ppsci.arch.paddle_harmonics.quadrature import clenshaw_curtiss_weights
from ppsci.arch.paddle_harmonics.quadrature import legendre_gauss_weights
from ppsci.arch.paddle_harmonics.quadrature import lobatto_weights


class RealSHT(nn.Layer):
Expand Down
2 changes: 1 addition & 1 deletion ppsci/arch/sfnonet.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ppsci.arch import base
from ppsci.arch import fno_block
from ppsci.paddle_harmonics import sht as paddle_sht
from ppsci.arch.paddle_harmonics import sht as paddle_sht
from ppsci.utils import initializer

einsum_symbols = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Expand Down

0 comments on commit 53c4ede

Please sign in to comment.