Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited4a4b6

Browse files
committed
add doc_string
1 parent5cbe8e5 commited4a4b6

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

‎onnx_array_api/plotting/text_plot.py‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,9 +864,15 @@ def str_node(indent, node):
864864
else:
865865
content=""
866866
line_name_new[init.name]=len(rows)
867+
ifinit.doc_string:
868+
rows.append(
869+
f"init: name={init.name!r} type={_get_type(init)} "
870+
f"shape={_get_shape(init)}{content} --{init.doc_string}"
871+
)
872+
continue
867873
rows.append(
868-
"init: name=%r type=%r shape=%r%s"
869-
% (init.name,_get_type(init),_get_shape(init),content)
874+
f"init: name={init.name!r} type={_get_type(init)}"
875+
f"shape={_get_shape(init)}{content}"
870876
)
871877
iflevel==0:
872878
rows.append("----- main graph ----")
@@ -1109,10 +1115,18 @@ def onnx_text_plot_io(model, verbose=False, att_display=None):
11091115
)
11101116
# initializer
11111117
forinitinmodel.initializer:
1118+
1119+
ifinit.doc_string:
1120+
rows.append(
1121+
f"init: name={init.name!r} type={_get_type(init)} "
1122+
f"shape={_get_shape(init)} --{init.doc_string}"
1123+
)
1124+
continue
11121125
rows.append(
1113-
"init: name=%r type=%r shape=%r"
1114-
% (init.name,_get_type(init),_get_shape(init))
1126+
f"init: name={init.name!r} type={_get_type(init)}"
1127+
f"shape={_get_shape(init)}"
11151128
)
1129+
11161130
# outputs
11171131
foroutinmodel.output:
11181132
rows.append(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp