-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[xdoctest][task 142] Reformat example code with google style in quantization/quant_int8_mkldnn_pass.py #56239
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
✅ This PR's description meets the template requirements! |
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.
LGTMeow 🐾
.. code-block:: python | ||
# The original graph will be rewrite. | ||
import paddle.static as static | ||
from paddle.static.quantization \ | ||
import QuantInt8MkldnnPass | ||
from paddle.fluid.framework import IrGraph | ||
from paddle.framework import core | ||
|
||
graph = IrGraph(core.Graph(static.Program().desc), for_test=False) | ||
place = static.CPUPlace() | ||
mkldnn_pass = QuantInt8MkldnnPass(static.global_scope(), | ||
place) | ||
mkldnn_pass.apply(graph) | ||
|
||
>>> # The original graph will be rewrite. | ||
>>> import paddle | ||
>>> from paddle import static | ||
>>> from paddle.static.quantization import QuantInt8MkldnnPass | ||
>>> from paddle.framework import IrGraph | ||
>>> from paddle.framework import core | ||
|
||
>>> graph = IrGraph(core.Graph(static.Program().desc), for_test=False) | ||
>>> place = paddle.CPUPlace() | ||
>>> mkldnn_pass = QuantInt8MkldnnPass(static.global_scope(), place) | ||
>>> mkldnn_pass.apply(graph) |
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.
.. code-block:: python
相对 Examples:
缩进一下吧~
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.
@Candy2Tang 在其他 PR 里改一下吧
quantization 里这个问题非常多,相关目录得仔细看一下,甚至之后可以专门看一下这个目录下全部的示例代码的缩进
PR types
Others
PR changes
Docs
Description
对应tracking issue: #55629
预览链接: