Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docathon] Fix save API Docs #6457

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/api/paddle/jit/save_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ save

- ``paddle.jit.load``
- ``paddle.static.load_inference_model``
- 其他预测库 API
- 其他 C++ 预测库 API

.. note::
当使用 ``paddle.jit.save`` 保存 ``function`` 时,``function`` 不能包含参数变量。如果必须保存参数变量,请用 Layer 封装 function,然后按照处理 Layer 的方式调用相应的 API。
Expand All @@ -24,8 +24,8 @@ save
:::::::::
- **layer** (Layer|function) - 需要存储的 ``Layer`` 对象或者 ``function``。
- **path** (str) - 存储模型的路径前缀。格式为 ``dirname/file_prefix`` 或者 ``file_prefix`` 。
- **input_spec** (list[InputSpec|Tensor],可选) - 描述存储模型 forward 方法的输入,可以通过 InputSpec 或者示例 Tensor 进行描述。如果为 ``None``,所有原 ``Layer`` forward 方法的输入变量将都会被配置为存储模型的输入变量。默认为 ``None``。
- **configs (dict,可选) - 其他用于兼容的存储配置选项。这些选项将来可能被移除,如果不是必须使用,不推荐使用这些配置选项。默认为 ``None``。目前支持以下配置选项:(1) output_spec (list[Tensor]) - 选择存储模型的输出目标。默认情况下,所有原 ``Layer`` forward 方法的返回值均会作为存储模型的输出。如果传入的 ``output_spec`` 列表不是所有的输出变量,存储的模型将会根据 ``output_spec`` 所包含的结果被裁剪。
- **input_spec** (list or tuple[InputSpec|Tensor|Python built-in variable],可选) - 描述存储模型 forward 方法的输入,可以通过 InputSpec 或者示例 Tensor 进行描述。此外,我们还支持指定非张量类型的参数,比如 int、float、string,或者这些类型的列表/字典。如果为 ``None``,所有原 ``Layer`` forward 方法的输入变量将都会被配置为存储模型的输入变量。默认为 ``None``。
- **configs** (dict,可选) - 其他用于兼容的存储配置选项。这些选项将来可能被移除,如果不是必须使用,不推荐使用这些配置选项。默认为 ``None``。目前支持以下配置选项:(1) output_spec (list[Tensor]) - 选择存储模型的输出目标。默认情况下,所有原 ``Layer`` forward 方法的返回值均会作为存储模型的输出。如果传入的 ``output_spec`` 列表不是所有的输出变量,存储的模型将会根据 ``output_spec`` 所包含的结果被裁剪。

返回
:::::::::
Expand Down