Skip to content

Commit

Permalink
Update develop doc (PaddlePaddle#357)
Browse files Browse the repository at this point in the history
* update install_setup.md

* update docstrings

* test=document_fix

* test=document_fix
  • Loading branch information
HydrogenSulfate authored May 31, 2023
1 parent 97c2d40 commit a44d3c7
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 21 deletions.
19 changes: 7 additions & 12 deletions docs/zh/install_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,20 @@
pip install -r requirements.txt
```

???+ Info "安装注意事项"

如需使用外部导入STL文件来构建几何,以及使用加密采样等功能,还需额外安装三个依赖库:
[pymesh](https://pymesh.readthedocs.io/en/latest/installation.html#download-the-source)(推荐编译安装),
[open3d](https://github.com/isl-org/Open3D/tree/master#python-quick-start)(推荐pip安装),
[pysdf](https://github.com/sxyu/sdf)(推荐pip安装)

#### 1.2.2 pip 安装

coming soon

<div style='display: none'>
执行以下命令进行 pip 安装

``` shell
pip install -i https://pypi.org/simple/ paddlesci
pip install paddlesci
```

</div>
???+ Info "安装注意事项"

如需使用外部导入STL文件来构建几何,以及使用加密采样等功能,还需额外安装三个依赖库:
[pymesh](https://pymesh.readthedocs.io/en/latest/installation.html#download-the-source)(推荐编译安装),
[open3d](https://github.com/isl-org/Open3D/tree/master#python-quick-start)(推荐pip安装),
[pysdf](https://github.com/sxyu/sdf)(推荐pip安装)

## 2. 验证安装

Expand Down
2 changes: 1 addition & 1 deletion ppsci/metric/anomaly_coef.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LatitudeWeightedACC(base.Metric):
$$
$$
L_m = N_{lat}\dfrac{cos(lat_m)}{\sum\limits_{j=1}^{N_{lat}}cos(lat_j)}
L_m = N_{lat}\dfrac{\cos(lat_m)}{\sum\limits_{j=1}^{N_{lat}}\cos(lat_j)}
$$
$lat_m$ is the latitude at m.
Expand Down
6 changes: 5 additions & 1 deletion ppsci/metric/l2_rel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class L2Rel(base.Metric):
r"""Class for l2 relative error.
$$
metric = \dfrac{\Vert x-y \Vert_2}{\Vert y \Vert_2}
metric = \dfrac{\Vert \mathbf{x} - \mathbf{y} \Vert_2}{\Vert \mathbf{y} \Vert_2}
$$
$$
\mathbf{x}, \mathbf{y} \in \mathcal{R}^{N}
$$
Args:
Expand Down
6 changes: 5 additions & 1 deletion ppsci/metric/mae.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ class MAE(base.Metric):
r"""Mean absolute error.
$$
metric = \dfrac{1}{N}\sum\limits_{i=1}^{N}{|x_i-y_i|}
metric = \dfrac{1}{N} \Vert \mathbf{x} - \mathbf{y} \Vert_1
$$
$$
\mathbf{x}, \mathbf{y} \in \mathcal{R}^{N}
$$
Args:
Expand Down
6 changes: 5 additions & 1 deletion ppsci/metric/mse.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ class MSE(base.Metric):
r"""Mean square error
$$
metric = \dfrac{1}{N}\sum\limits_{i=1}^{N}{(x_i-y_i)^2}
metric = \dfrac{1}{N} \Vert \mathbf{x} - \mathbf{y} \Vert_2^2
$$
$$
\mathbf{x}, \mathbf{y} \in \mathcal{R}^{N}
$$
Args:
Expand Down
8 changes: 6 additions & 2 deletions ppsci/metric/rmse.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class RMSE(base.Metric):
r"""Root mean square error
$$
metric = \sqrt{\dfrac{1}{N}\sum\limits_{i=1}^{N}{(x_i-y_i)^2}}
metric = \sqrt{\dfrac{1}{N} \Vert \mathbf{x} - \mathbf{y} \Vert_2^2}
$$
$$
\mathbf{x}, \mathbf{y} \in \mathcal{R}^{N}
$$
Args:
Expand Down Expand Up @@ -62,7 +66,7 @@ class LatitudeWeightedRMSE(base.Metric):
$$
$$
L_m = N_{lat}\dfrac{cos(lat_m)}{\sum\limits_{j=1}^{N_{lat}}cos(lat_j)}
L_m = N_{lat}\dfrac{\cos(lat_m)}{\sum\limits_{j=1}^{N_{lat}}\cos(lat_j)}
$$
$lat_m$ is the latitude at m.
Expand Down
2 changes: 1 addition & 1 deletion ppsci/utils/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def visu_forward(
Args:
expr_dict (Optional[Dict[str, Callable]]): Expression dict.
input_dict (Dict[str, paddle.Tensor]]): Input dict.
input_dict (Dict[str, paddle.Tensor]): Input dict.
model (nn.Layer): NN model.
Returns:
Expand Down
4 changes: 2 additions & 2 deletions ppsci/visualize/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def _save_plot_from_2d_array(
Args:
filename (str): Filename.
visu_data (Tuple[np.ndarray, ...]): Data that requires visualization.
visu_keys (Tuple[str, ...]]): Keys for visualizing data. such as ("u", "v").
visu_keys (Tuple[str, ...]): Keys for visualizing data. such as ("u", "v").
num_timestamps (int, optional): Number of timestamps coord/value contains. Defaults to 1.
stride (int, optional): The time stride of visualization. Defaults to 1.
xticks (Optional[Tuple[float, ...]]): Tuple of xtick locations. Defaults to None.
Expand Down Expand Up @@ -314,7 +314,7 @@ def _save_plot_from_3d_array(
Args:
filename (str): Filename.
visu_data (Tuple[np.ndarray, ...]): Data that requires visualization.
visu_keys (Tuple[str, ...]]): Keys for visualizing data. such as ("u", "v").
visu_keys (Tuple[str, ...]): Keys for visualizing data. such as ("u", "v").
num_timestamps (int, optional): Number of timestamps coord/value contains. Defaults to 1.
"""

Expand Down

0 comments on commit a44d3c7

Please sign in to comment.