diff --git a/RELEASE.md b/RELEASE.md index 5b0bf0a3e05..aee2a578c58 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,7 +17,7 @@ - [STABLE] Support dynamic weight decay for optimizers, that is weight decay value will change according to the increasing step during training. - [STABLE] Add four methods to create Tensor, which are `mindspore.numpy.rand()`, `mindspore.numpy.randn()`, `mindspore.numpy.randint()`, and `mindspore.ops.arange()`. -- [STABLE] Add `mindspore.callback.History` and `mindspore.callback.LambdaCallback` in Callback. +- [STABLE] Add `mindspore.callback.History` in Callback. - [BETA] Support custom operator implemented by Julia operator. - [STABLE] Support accessing attributes and methods of user-defined classes through `mindspore.ms_class` class decorator. - [STABLE] Support training when a network has side effect operations and control flow statements at the same time. diff --git a/RELEASE_CN.md b/RELEASE_CN.md index 685eeae6c07..ccff82f884c 100644 --- a/RELEASE_CN.md +++ b/RELEASE_CN.md @@ -17,7 +17,7 @@ - [STABLE] 优化器支持动态权重衰减,即训练期间权重衰减值随着step的增加而变化。 - [STABLE] 增加四种创建Tensor的方法,分别是`mindspore.numpy.rand()`、`mindspore.numpy.randn()`、`mindspore.numpy.randint()`和`mindspore.ops.arange ()`。 -- [STABLE] 增加两种callback方法 `mindspore.callback.History` 和 `mindspore.callback.LambdaCallback`。 +- [STABLE] 增加一种callback方法 `mindspore.callback.History`。 - [BETA] 自定义算子支持Julia算子。 - [STABLE] 通过 `mindspore.ms_class` 类装饰器,支持获取用户自定义类的属性和方法。 - [STABLE] 支持同时存在副作用算子和控制流语句的网络的训练。 diff --git a/docs/api/api_python/train/mindspore.train.callback.LambdaCallback.rst b/docs/api/api_python/train/mindspore.train.callback.LambdaCallback.rst index d028cfc35dd..4efc8b1cfde 100644 --- a/docs/api/api_python/train/mindspore.train.callback.LambdaCallback.rst +++ b/docs/api/api_python/train/mindspore.train.callback.LambdaCallback.rst @@ -6,6 +6,9 @@ 请注意,callback的每个阶段都需要一个位置参数:`run_context`。 + .. note:: + - 这是一个会变更或删除的实验性接口。 + **参数:** - **epoch_begin** (Function) - 每个epoch开始时被调用。 diff --git a/mindspore/python/mindspore/train/callback/_lambda_callback.py b/mindspore/python/mindspore/train/callback/_lambda_callback.py index 25c4c3d5a75..1b2897b0aa6 100644 --- a/mindspore/python/mindspore/train/callback/_lambda_callback.py +++ b/mindspore/python/mindspore/train/callback/_lambda_callback.py @@ -22,9 +22,11 @@ class LambdaCallback(Callback): Callback for creating simple, custom callbacks. This callback is constructed with anonymous functions that will be called - at the appropriate time (during `mindspore.Model.{train | eval}`). + at the appropriate time (during `mindspore.Model.{train | eval}`). Note that + each stage of callbacks expects one positional arguments: `run_context`. - Note that each stage of callbacks expects one positional arguments: `run_context`. + Note: + This is an experimental interface that is subject to change or deletion. Args: epoch_begin (Function): called at the beginning of every epoch.