未验证 提交 a9aca162 编写于 作者: C Candy2Tang 提交者: GitHub

[xdoctest][task 142] Reformat example code with google style in...

[xdoctest][task 142] Reformat example code with google style in quantization/quant_int8_mkldnn_pass.py (#56239)

* [xdoctest][task 142] test=docs_preview

* Update python/paddle/static/quantization/quant_int8_mkldnn_pass.py

* Update python/paddle/static/quantization/quant_int8_mkldnn_pass.py

---------
Co-authored-by: NNyakku Shigure <sigure.qaq@gmail.com>
上级 baf2ffaf
...@@ -44,18 +44,18 @@ class QuantInt8MkldnnPass: ...@@ -44,18 +44,18 @@ class QuantInt8MkldnnPass:
Examples: Examples:
.. code-block:: python .. code-block:: python
# The original graph will be rewrite.
import paddle.static as static >>> # The original graph will be rewrite.
from paddle.static.quantization \ >>> import paddle
import QuantInt8MkldnnPass >>> from paddle import static
from paddle.fluid.framework import IrGraph >>> from paddle.static.quantization import QuantInt8MkldnnPass
from paddle.framework import core >>> from paddle.framework import IrGraph
>>> from paddle.framework import core
graph = IrGraph(core.Graph(static.Program().desc), for_test=False)
place = static.CPUPlace() >>> graph = IrGraph(core.Graph(static.Program().desc), for_test=False)
mkldnn_pass = QuantInt8MkldnnPass(static.global_scope(), >>> place = paddle.CPUPlace()
place) >>> mkldnn_pass = QuantInt8MkldnnPass(static.global_scope(), place)
mkldnn_pass.apply(graph) >>> mkldnn_pass.apply(graph)
""" """
self._scope = _scope self._scope = _scope
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册