提交 b22ceba7 编写于 作者: M Megvii Engine Team

docs(imperative): fix code exmaple indent warnings

GitOrigin-RevId: aa533bf2964b4b40ea366329da66bd47a2ca2e52
上级 7ac693a8
......@@ -209,7 +209,11 @@ def main():
class to logs which can be read by python `tensorboard`.
Now `get_static_memory_alloc_info()` support this feature,it will dump a dir
which can be convert by `graph_info_analyze.py`.
Examples::
Examples:
.. code-block:: shell
graph_info_analyze.py -i <input_dir_name> -o <output_dir_name>
tensorboard --logdir <output_dir_name>
"""
......
......@@ -1777,7 +1777,7 @@ class ExprFilter(BaseFilter):
class NodeFilter(BaseFilter):
"""Filter on Node iterator.
This class is an iterator of :class:`.Node` objects and multiple
This class is an iterator of :class:`~.traced_module.Node` objects and multiple
filtering conditions and mappers can be chained.
"""
......
......@@ -141,13 +141,18 @@ class SummaryWriterExtend(SummaryWriter):
def add_text(self, tag, text_string_list, global_step=None, walltime=None):
"""Add text data to summary.
Args:
tag (string): Data identifier
text_string_list (string list): String to save
global_step (int): Global step value to record
walltime (float): Optional override default walltime (time.time())
seconds after epoch of event
Examples::
Examples:
.. code-block:: python
# text can be divided into three levels by tag and global_step
from writer import SummaryWriterExtend
writer = SummaryWriterExtend()
......@@ -171,8 +176,11 @@ class SummaryWriterExtend(SummaryWriter):
dtype=None,
attributes={},
):
"""Add node raw datas that can help build graph.After add all nodes, call
add_graph_by_node_raw_list() to build graph and add graph data to summary.
"""Add node raw datas that can help build graph.
After add all nodes, call ``add_graph_by_node_raw_list()`` to build
graph and add graph data to summary.
Args:
name (string): opr name.
op (string): opr class name.
......@@ -180,7 +188,11 @@ class SummaryWriterExtend(SummaryWriter):
outputshape (list): output shape.
dtype (string): output data dtype.
attributes (dict): attributes info.
Examples::
Examples:
.. code-block:: python
from writer import SummaryWriterExtend
writer = SummaryWriterExtend()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册