Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
44b59652
提交
44b59652
authored
7月 28, 2015
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make the update var a separate var in pydotprint
上级
09762a8b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
11 行删除
+10
-11
printing.py
theano/printing.py
+10
-11
没有找到文件。
theano/printing.py
浏览文件 @
44b59652
...
...
@@ -785,10 +785,6 @@ def pydotprint(fct, outfile=None,
suffix
)
var_str
[
var
]
=
varstr
# The var that represent the new value, must be linked to the
# input var.
if
var
in
input_update
.
values
():
var_str
[
reverse_input_update
[
var
]]
=
varstr
all_strings
.
add
(
varstr
)
return
varstr
...
...
@@ -933,7 +929,7 @@ def pydotprint(fct, outfile=None,
param
=
{}
if
label
:
param
[
'label'
]
=
label
if
out
:
if
out
or
var
in
input_update
:
g
.
add_edge
(
pd
.
Edge
(
astr
,
varstr
,
**
param
))
if
high_contrast
:
g
.
add_node
(
pd
.
Node
(
varstr
,
style
=
'filled'
,
...
...
@@ -948,8 +944,8 @@ def pydotprint(fct, outfile=None,
fillcolor
=
'grey'
,
shape
=
var_shape
))
else
:
g
.
add_node
(
pd
.
Node
(
varstr
,
color
=
'grey'
,
shape
=
var_shape
))
elif
var
.
name
or
not
compact
or
var
in
input_update
:
if
not
(
not
compact
or
var
in
input_update
):
elif
var
.
name
or
not
compact
:
if
not
(
not
compact
):
if
label
:
label
+=
" "
label
+=
str
(
var
.
type
)
...
...
@@ -957,13 +953,16 @@ def pydotprint(fct, outfile=None,
label
=
label
[:
max_label_size
-
3
]
+
'...'
param
[
'label'
]
=
label
g
.
add_edge
(
pd
.
Edge
(
astr
,
varstr
,
**
param
))
if
high_contrast
:
g
.
add_node
(
pd
.
Node
(
varstr
,
shape
=
var_shape
))
else
:
g
.
add_node
(
pd
.
Node
(
varstr
,
shape
=
var_shape
))
g
.
add_node
(
pd
.
Node
(
varstr
,
shape
=
var_shape
))
# else:
# don't add egde here as it is already added from the inputs.
# The var that represent updates, must be linked to the input var.
for
sha
,
up
in
input_update
.
items
():
shastr
=
var_name
(
sha
)
upstr
=
var_name
(
up
)
g
.
add_edge
(
pd
.
Edge
(
shastr
,
upstr
,
label
=
"UPDATE"
,
color
=
"red"
))
if
cond_highlight
:
g
.
add_subgraph
(
c1
)
g
.
add_subgraph
(
c2
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论