From 49978aff5f295b8c87f21cae614144591eed4ad1 Mon Sep 17 00:00:00 2001 From: huanghui Date: Mon, 20 Feb 2023 15:32:59 +0800 Subject: [PATCH] update Cell api cn doc --- docs/api/api_python/nn/mindspore.nn.Cell.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/api/api_python/nn/mindspore.nn.Cell.rst b/docs/api/api_python/nn/mindspore.nn.Cell.rst index 08a6dacbad0..239179ca664 100644 --- a/docs/api/api_python/nn/mindspore.nn.Cell.rst +++ b/docs/api/api_python/nn/mindspore.nn.Cell.rst @@ -97,14 +97,15 @@ 检查Cell中的网络参数名称是否重复。 - .. py:method:: compile(*inputs) + .. py:method:: compile(*args, **kwargs) 编译Cell为计算图,输入需与construct中定义的输入一致。 参数: - - **inputs** (tuple) - Cell的输入。 + - **args** (tuple) - Cell的输入。 + - **kwargs** (dict) - Cell的输入。 - .. py:method:: compile_and_run(*inputs) + .. py:method:: compile_and_run(*args, **kwargs) 编译并运行Cell,输入需与construct中定义的输入一致。 @@ -112,12 +113,13 @@ 不推荐使用该函数,建议直接调用Cell实例。 参数: - - **inputs** (tuple) - Cell的输入。 + - **args** (tuple) - Cell的输入。 + - **kwargs** (dict) - Cell的输入。 返回: Object类型,执行的结果。 - .. py:method:: construct(*inputs, **kwargs) + .. py:method:: construct(*args, **kwargs) 定义要执行的计算逻辑。所有子类都必须重写此方法。 @@ -125,7 +127,7 @@ 当前不支持inputs同时输入tuple类型和非tuple类型。 参数: - - **inputs** (tuple) - 可变参数列表,默认值:()。 + - **args** (tuple) - 可变参数列表,默认值:()。 - **kwargs** (dict) - 可变的关键字参数的字典,默认值:{}。 返回: