From ad9a67794d3df0f85e64a567a68d601706f921b8 Mon Sep 17 00:00:00 2001 From: huanxiaoling <3174348550@qq.com> Date: Fri, 25 Nov 2022 16:12:34 +0800 Subject: [PATCH] modify the format of fils 1125 --- MindFlow/mindflow/common/callback.py | 2 +- MindFlow/mindflow/common/lr_scheduler.py | 2 +- MindFlow/mindflow/common/metrics.py | 2 +- MindFlow/mindflow/data/dataset.py | 2 +- MindFlow/mindflow/geometry/geometry_nd.py | 1 + ...ndTimeMonitor.rst => mindflow.common.LossAndTimeMonitor.rst} | 2 +- docs/api_python/mindflow/mindflow.common.rst | 2 ++ docs/api_python/mindflow/mindflow.solver.rst | 2 -- 8 files changed, 8 insertions(+), 7 deletions(-) rename docs/api_python/mindflow/{mindflow.solver.LossAndTimeMonitor.rst => mindflow.common.LossAndTimeMonitor.rst} (93%) diff --git a/MindFlow/mindflow/common/callback.py b/MindFlow/mindflow/common/callback.py index e1b207b52..bf5ab8b04 100644 --- a/MindFlow/mindflow/common/callback.py +++ b/MindFlow/mindflow/common/callback.py @@ -78,7 +78,7 @@ class LossAndTimeMonitor(Callback): If per_print_times is 0, do not print loss. Args: - data_size (int): number of batches of each epoch dataset + data_size (int): number of batches of each epoch dataset. per_print_times (int): Print the loss each every seconds. Default: 1. Raises: diff --git a/MindFlow/mindflow/common/lr_scheduler.py b/MindFlow/mindflow/common/lr_scheduler.py index 625c26caf..6d235f382 100644 --- a/MindFlow/mindflow/common/lr_scheduler.py +++ b/MindFlow/mindflow/common/lr_scheduler.py @@ -57,7 +57,7 @@ class LearningRate(LearningRateSchedule): Inputs: - **global_step** (Tensor) - The current step number with shape :math:`()`. - Returns: + Outputs: Tensor. The learning rate value for the current step with shape :math:`()`. Supported Platforms: diff --git a/MindFlow/mindflow/common/metrics.py b/MindFlow/mindflow/common/metrics.py index 65294f134..f6a7915c3 100644 --- a/MindFlow/mindflow/common/metrics.py +++ b/MindFlow/mindflow/common/metrics.py @@ -67,7 +67,7 @@ class L2(nn.Metric): """ Updates the internal evaluation result :math:`y_{pred}` and :math:`y`. - Args: + 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. diff --git a/MindFlow/mindflow/data/dataset.py b/MindFlow/mindflow/data/dataset.py index 1d84abaae..75253700a 100644 --- a/MindFlow/mindflow/data/dataset.py +++ b/MindFlow/mindflow/data/dataset.py @@ -315,7 +315,7 @@ class Dataset(Data): """set constraint type of dataset Args: - constraint_type (Union[str, dict): The constraint type of specified dataset. If is string, the constraint + constraint_type (Union[str, dict]): The constraint type of specified dataset. If is string, the constraint type of all subdataset will be set to the same one. If is dict, the subdataset and it's constraint type is specified by the pair (key, value). Default: "Equation". diff --git a/MindFlow/mindflow/geometry/geometry_nd.py b/MindFlow/mindflow/geometry/geometry_nd.py index 19b2ffcb2..3b92e69f9 100644 --- a/MindFlow/mindflow/geometry/geometry_nd.py +++ b/MindFlow/mindflow/geometry/geometry_nd.py @@ -134,6 +134,7 @@ class HyperCube(Geometry): Raises: TypeError: sampling_config is not instance of class SamplingConfig. + Supported Platforms: ``Ascend`` ``GPU`` diff --git a/docs/api_python/mindflow/mindflow.solver.LossAndTimeMonitor.rst b/docs/api_python/mindflow/mindflow.common.LossAndTimeMonitor.rst similarity index 93% rename from docs/api_python/mindflow/mindflow.solver.LossAndTimeMonitor.rst rename to docs/api_python/mindflow/mindflow.common.LossAndTimeMonitor.rst index f0f3256fb..e2854f99a 100644 --- a/docs/api_python/mindflow/mindflow.solver.LossAndTimeMonitor.rst +++ b/docs/api_python/mindflow/mindflow.common.LossAndTimeMonitor.rst @@ -1,4 +1,4 @@ -.. py:class:: mindflow.solver.LossAndTimeMonitor(data_size, per_print_times=1) +.. py:class:: mindflow.common.LossAndTimeMonitor(data_size, per_print_times=1) 监控训练中的loss。 diff --git a/docs/api_python/mindflow/mindflow.common.rst b/docs/api_python/mindflow/mindflow.common.rst index b7fa1f22d..2a5db01a5 100644 --- a/docs/api_python/mindflow/mindflow.common.rst +++ b/docs/api_python/mindflow/mindflow.common.rst @@ -5,6 +5,8 @@ mindflow.common .. include:: mindflow.common.LearningRate.rst +.. include:: mindflow.common.LossAndTimeMonitor.rst + .. include:: mindflow.common.get_poly_lr.rst .. automodule:: mindflow.common diff --git a/docs/api_python/mindflow/mindflow.solver.rst b/docs/api_python/mindflow/mindflow.solver.rst index 1f05ff5c0..85a15a478 100644 --- a/docs/api_python/mindflow/mindflow.solver.rst +++ b/docs/api_python/mindflow/mindflow.solver.rst @@ -3,8 +3,6 @@ mindflow.solver .. include:: mindflow.solver.EvalCallback.rst -.. include:: mindflow.solver.LossAndTimeMonitor.rst - .. include:: mindflow.solver.Problem.rst .. include:: mindflow.solver.Solver.rst -- Gitee