From 629dd08baa09d582aeac3bba13deee7f9cab6729 Mon Sep 17 00:00:00 2001 From: huanxiaoling <3174348550@qq.com> Date: Fri, 2 Dec 2022 11:26:00 +0800 Subject: [PATCH] modify the format of files in mindflow --- MindFlow/mindflow/cell/neural_operators/fno1d.py | 2 +- MindFlow/mindflow/common/metrics.py | 4 ++-- .../mindflow/mindflow.geometry.PartSamplingConfig.rst | 2 +- docs/api_python/mindflow/mindflow.geometry.Rectangle.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MindFlow/mindflow/cell/neural_operators/fno1d.py b/MindFlow/mindflow/cell/neural_operators/fno1d.py index 890308a01..6b7246ea4 100644 --- a/MindFlow/mindflow/cell/neural_operators/fno1d.py +++ b/MindFlow/mindflow/cell/neural_operators/fno1d.py @@ -98,7 +98,7 @@ class FNO1D(nn.Cell): mlp_ratio (int): The number of channels lifting ratio of the decoder layer. Default: 4. compute_dtype (dtype.Number): The computation type of dense. Default mstype.float16. Should be mstype.float32 or mstype.float16. mstype.float32 is recommended for - the GPU backend, mstype.float16 is recommended for the Ascend backend. + the GPU backend, mstype.float16 is recommended for the Ascend backend. Inputs: - **x** (Tensor) - Tensor of shape :math:`(batch\_size, resolution, input\_dims)`. diff --git a/MindFlow/mindflow/common/metrics.py b/MindFlow/mindflow/common/metrics.py index f6a7915c3..ed58ad203 100644 --- a/MindFlow/mindflow/common/metrics.py +++ b/MindFlow/mindflow/common/metrics.py @@ -69,8 +69,8 @@ class L2(nn.Metric): Args: inputs (Union[Tensor, list, numpy.array]): `y_pred` and `y` can be retrieved from `input`. `y_pred` is - the predicted value while `y` the ground truth value. - They are used for calculating L2 where the shape of them are the same. + the predicted value while `y` the ground truth value. + They are used for calculating L2 where the shape of them are the same. Raises: ValueError: if the length of inputs is not 2. diff --git a/docs/api_python/mindflow/mindflow.geometry.PartSamplingConfig.rst b/docs/api_python/mindflow/mindflow.geometry.PartSamplingConfig.rst index 282c6dca0..469a67be4 100644 --- a/docs/api_python/mindflow/mindflow.geometry.PartSamplingConfig.rst +++ b/docs/api_python/mindflow/mindflow.geometry.PartSamplingConfig.rst @@ -8,7 +8,7 @@ - **sampler** (str) - 随机采样的方法。默认值:uniform。 - **random_merge** (bool) - 是否随机合并不同维度的坐标。默认值:True。 - **with_normal** (bool) - 是否生成边界的法向向量。默认值:False。 - - **with_sdf** (bool)- 是否返回域内点的符号距离函数结果。默认值:False。 + - **with_sdf** (bool) - 是否返回域内点的符号距离函数结果。默认值:False。 异常: - **TypeError** - 采样点数不为int时。 diff --git a/docs/api_python/mindflow/mindflow.geometry.Rectangle.rst b/docs/api_python/mindflow/mindflow.geometry.Rectangle.rst index 58e6e5ab7..9346da373 100644 --- a/docs/api_python/mindflow/mindflow.geometry.Rectangle.rst +++ b/docs/api_python/mindflow/mindflow.geometry.Rectangle.rst @@ -1,4 +1,4 @@ -.. py:class:: mindflow.geometry.Rectangle(name, coord_min, coord_max, dtype=, sampling_config=None) +.. py:class:: mindflow.geometry.Rectangle(name, coord_min, coord_max, dtype=np.float32, sampling_config=None) 矩形对象的定义。 -- Gitee