-
Notifications
You must be signed in to change notification settings - Fork 876
[Docathon][Add CN Doc No.42] #6452
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
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d799074
new file: docs/api/paddle/nn/quant/Stub_cn.rst
entired 32a613e
modified: docs/api/paddle/nn/quant/Stub_cn.rst
entired ecb4ef3
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into m…
entired 80eb12c
modified: docs/api/paddle/nn/quant/Stub_cn.rst
entired 6d2035a
Merge branch 'develop' of https://github.com/PaddlePaddle/docs into m…
entired a0e2894
modified: docs/api/paddle/nn/quant/Stub_cn.rst
entired File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| .. _cn_api_paddle_nn_quant_Stub: | ||
| Stub | ||
| ------------------------------- | ||
|
|
||
| .. py:class:: paddle.nn.quant.Stub(observer=None) | ||
|
|
||
| 存根用作占位符,在 PTQ 或 QAT 之前将被观察者替换。将量化配置分配给在层的转发中调用的功能 API 是很困难的。相反,我们可以创建一个存根,并将其添加到层的子层。并在转发函数 API 之前调用存根。由存根持有的观察者将观察或量化功能 API 的输入。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
|
|
||
| - **observer** (QuanterFactory) - 要插入的观察点的配置信息。如果 observer 为 none, 它将使用全局配置来创建 observer - 表示不使用观察器,也不收集任何关于模型参数或激活的统计数据,仅作为占位符存在。 | ||
|
|
||
| 代码示例 | ||
| :::::::::::: | ||
|
|
||
| COPY-FROM: paddle.nn.quant.stub | ||
|
|
||
| forward(input) | ||
| '''''''''''' | ||
| 定义每次调用时执行的计算。应由所有子类覆盖。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **input** (tuple) - 解压缩的元组参数。 | ||
| - **kwargs** (dict) - 解压缩的 dict 参数。 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码示例不对,没体现该接口的使用方式。