Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
0a090a25
提交
0a090a25
authored
7月 29, 2015
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix flake8 and remove assert as we now use id to separate node, not label.
上级
c4d27c82
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
3 行增加
和
13 行删除
+3
-13
printing.py
theano/printing.py
+1
-9
test_printing.py
theano/tests/test_printing.py
+2
-4
没有找到文件。
theano/printing.py
浏览文件 @
0a090a25
...
...
@@ -584,7 +584,6 @@ def pydotprint(fct, outfile=None,
max_label_size
=
70
,
scan_graphs
=
False
,
var_with_name_simple
=
False
,
print_output_file
=
True
,
assert_nb_all_strings
=-
1
,
return_image
=
False
,
):
"""Print to a file the graph of a compiled theano function's ops. Supports
...
...
@@ -616,10 +615,6 @@ def pydotprint(fct, outfile=None,
:param var_with_name_simple: If true and a variable have a name,
we will print only the variable name.
Otherwise, we concatenate the type to the var name.
:param assert_nb_all_strings: Used for tests. If non-negative, assert that
the number of unique string nodes in the dot graph is equal to
this number. This is used in tests to verify that dot won't
merge Theano nodes.
:param return_image: If True, it will create the image and return it.
Useful to display the image in ipython notebook.
...
...
@@ -975,9 +970,6 @@ def pydotprint(fct, outfile=None,
if
not
outfile
.
endswith
(
'.'
+
format
):
outfile
+=
'.'
+
format
if
assert_nb_all_strings
!=
-
1
:
assert
len
(
all_strings
)
==
assert_nb_all_strings
,
len
(
all_strings
)
if
scan_graphs
:
scan_ops
=
[(
idx
,
x
)
for
idx
,
x
in
enumerate
(
topo
)
if
isinstance
(
x
.
op
,
theano
.
scan_module
.
scan_op
.
Scan
)]
...
...
@@ -1073,7 +1065,7 @@ def pydotprint_variables(vars,
if
len
(
varstr
)
>
max_label_size
:
varstr
=
varstr
[:
max_label_size
-
3
]
+
'...'
var_str
[
var
]
=
varstr
return
varstr
,
varlabel
return
varstr
def
apply_name
(
node
):
name
=
str
(
node
.
op
)
.
replace
(
':'
,
'_'
)
...
...
theano/tests/test_printing.py
浏览文件 @
0a090a25
...
...
@@ -107,12 +107,10 @@ def test_pydotprint_long_name():
f
([
1
,
2
,
3
,
4
])
theano
.
printing
.
pydotprint
(
f
,
max_label_size
=
5
,
print_output_file
=
False
,
assert_nb_all_strings
=
6
)
print_output_file
=
False
)
theano
.
printing
.
pydotprint
([
x
*
2
,
x
+
x
],
max_label_size
=
5
,
print_output_file
=
False
,
assert_nb_all_strings
=
8
)
print_output_file
=
False
)
def
test_pydotprint_profile
():
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论