From bb8b9a3540d5e70053a9018495f70ecca4be3353 Mon Sep 17 00:00:00 2001 From: HydrogenSulfate <490868991@qq.com> Date: Wed, 31 May 2023 11:25:58 +0800 Subject: [PATCH 1/2] Update doc for release/1.0 (#356) * update links README.md and index.md from latest to release/1.0(test=document_fix) * update install_setup.md * update docstrings --- README.md | 8 ++++---- docs/index.md | 2 +- docs/zh/install_setup.md | 19 +++++++------------ ppsci/metric/anomaly_coef.py | 2 +- ppsci/metric/l2_rel.py | 6 +++++- ppsci/metric/mae.py | 6 +++++- ppsci/metric/mse.py | 6 +++++- ppsci/metric/rmse.py | 8 ++++++-- ppsci/utils/expression.py | 2 +- ppsci/visualize/plot.py | 4 ++-- 10 files changed, 37 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index ff9dc4f9f..bb6401b5e 100644 --- a/README.md +++ b/README.md @@ -54,15 +54,15 @@ PaddleScience 是一个基于深度学习框架 PaddlePaddle 开发的科学计 # write your code here... ``` -更多安装方式请参考 [**安装与使用**](https://paddlescience-docs.readthedocs.io/zh/latest/zh/install_setup/) +更多安装方式请参考 [**安装与使用**](https://paddlescience-docs.readthedocs.io/zh/release-1.0/zh/install_setup/) ## 快速开始 -请参考 [**快速开始**](https://paddlescience-docs.readthedocs.io/zh/latest/zh/quickstart/) +请参考 [**快速开始**](https://paddlescience-docs.readthedocs.io/zh/release-1.0/zh/quickstart/) ## 经典案例 -请参考 [**经典案例**](https://paddlescience-docs.readthedocs.io/zh/latest/zh/examples/viv/) +请参考 [**经典案例**](https://paddlescience-docs.readthedocs.io/zh/release-1.0/zh/examples/viv/) ## 支持 @@ -70,7 +70,7 @@ PaddleScience 是一个基于深度学习框架 PaddlePaddle 开发的科学计 ## 贡献代码 -PaddleScience 项目欢迎并依赖开发人员和开源社区中的用户,请参阅 [**贡献指南**](https://paddlescience-docs.readthedocs.io/zh/latest/zh/contribute/)。 +PaddleScience 项目欢迎并依赖开发人员和开源社区中的用户,请参阅 [**贡献指南**](https://paddlescience-docs.readthedocs.io/zh/release-1.0/zh/contribute/)。 ## 证书 diff --git a/docs/index.md b/docs/index.md index 172676656..99a5de427 100644 --- a/docs/index.md +++ b/docs/index.md @@ -21,7 +21,7 @@ PaddleScience 是一个基于深度学习框架 PaddlePaddle 开发的科学计 ## 贡献代码 -PaddleScience 项目欢迎并依赖开发人员和开源社区中的用户,请参阅 [**贡献指南**](https://paddlescience-docs.readthedocs.io/zh/latest/zh/contribute/)。 +PaddleScience 项目欢迎并依赖开发人员和开源社区中的用户,请参阅 [**贡献指南**](https://paddlescience-docs.readthedocs.io/zh/release-1.0/zh/contribute/)。 ## 证书 diff --git a/docs/zh/install_setup.md b/docs/zh/install_setup.md index d35904f47..40e87317e 100644 --- a/docs/zh/install_setup.md +++ b/docs/zh/install_setup.md @@ -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 - -
+???+ 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. 验证安装 diff --git a/ppsci/metric/anomaly_coef.py b/ppsci/metric/anomaly_coef.py index 4faf2ac9b..a94af65ed 100644 --- a/ppsci/metric/anomaly_coef.py +++ b/ppsci/metric/anomaly_coef.py @@ -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. diff --git a/ppsci/metric/l2_rel.py b/ppsci/metric/l2_rel.py index 501b7f9de..80fe68a13 100644 --- a/ppsci/metric/l2_rel.py +++ b/ppsci/metric/l2_rel.py @@ -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: diff --git a/ppsci/metric/mae.py b/ppsci/metric/mae.py index 54f814aa1..cd8e28f9b 100644 --- a/ppsci/metric/mae.py +++ b/ppsci/metric/mae.py @@ -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: diff --git a/ppsci/metric/mse.py b/ppsci/metric/mse.py index 979ca3c20..b0a1ae6ad 100644 --- a/ppsci/metric/mse.py +++ b/ppsci/metric/mse.py @@ -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: diff --git a/ppsci/metric/rmse.py b/ppsci/metric/rmse.py index 7dff09343..8b2c7a7b0 100644 --- a/ppsci/metric/rmse.py +++ b/ppsci/metric/rmse.py @@ -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: @@ -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. diff --git a/ppsci/utils/expression.py b/ppsci/utils/expression.py index 33116e35a..80fe50b8e 100644 --- a/ppsci/utils/expression.py +++ b/ppsci/utils/expression.py @@ -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: diff --git a/ppsci/visualize/plot.py b/ppsci/visualize/plot.py index 7aa90d91a..827847691 100644 --- a/ppsci/visualize/plot.py +++ b/ppsci/visualize/plot.py @@ -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. @@ -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. """ From 08a9bebc3f8d454cdcf56d59b4ab2dbd180b4663 Mon Sep 17 00:00:00 2001 From: HydrogenSulfate <490868991@qq.com> Date: Wed, 31 May 2023 20:28:24 +0800 Subject: [PATCH 2/2] Cherry pick panorama (#360) * fix panorama.png --- docs/images/overview/panorama.png | Bin 85712 -> 86177 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/images/overview/panorama.png b/docs/images/overview/panorama.png index 01d98652eaf6d6aa4e2e224148697b916de9ff5b..64bac4cd31e3a111fc1cc951c1f55391f83fd6c7 100644 GIT binary patch literal 86177 zcmdRWcQ~BeyLN1e8bnAWx`-a6=ruYKogjKdL>X=LQKCge5K*IzXruRDMoSQ)m%-?5 zn9)Zc%r{c@-sha}zwiA1_^yk%UU}D=XWi?0?x(FKOjBKnjD(it(xppeD$4TOmo8oA zymSd)lZXKK8zj_p2KNIGsI4S>sko1R4fk-_T1HLg(xtK}(o>5oxMyM~WkcYlOXTer z-*}ylxi2qW!e*<;%jkNVt~Z%}K1wn@D$_fe&EzsmvZ0O*{Ab zkT?I)F{=Qz!QMoCr%6oFyN-Pn*-dmd9Q8LYki7}wv8+KlbMUP077bdi>HR73Y1tG; z?KVBF_e%t#F4vIn^atGi-feNr(_dpP&-vSYt}Okeu*T*tl2SEis;6!f6`?6_DzA~2 zC@%$yp67*XsB4^p%nHXOd_KS+yWjn7HBJ?yB!ces;csf-ZYXhNosl;QefH5wM2;~R zzzy_594;$cAyOvb0|CaJ8qB39Un|V8Qydz`%-Br(Oc#Wbr>iu!ab#XxRTl96p)lU$ z0Cm{u7paGNi6>b{%Fc&~&0n~oYA#^TFnidsL|NoJ@i^+p{S?^@g2S;LksOVGI7 z?I6+c&EnZbE1+(F=vd-&mPD6Ii2lKsD9t{rTt xE?V}t!3%6OEjCypYI5QjTeW!V+ zc{Xd*oUJDR(dJRODcAgVET1a~*Ib-kD4)CiEL_F(!_hXYRYr}olgg<{B4dgWBNC2M zL^x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