Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e436106d
提交
e436106d
authored
6月 18, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Print only once per compilation the warning.
上级
262b0278
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
11 行删除
+13
-11
toolbox.py
theano/gof/toolbox.py
+11
-10
blas.py
theano/tensor/blas.py
+2
-1
没有找到文件。
theano/gof/toolbox.py
浏览文件 @
e436106d
...
...
@@ -147,7 +147,7 @@ class ReplaceValidate(History, Validator):
return
chk
def
replace_all_validate_remove
(
self
,
env
,
replacements
,
remove
,
reason
=
None
):
remove
,
reason
=
None
,
warn
=
True
):
"""As replace_all_validate, revert the replacement if the ops
in the list remove are still in the graph. It also print a warning.
...
...
@@ -156,15 +156,16 @@ class ReplaceValidate(History, Validator):
for
rm
in
remove
:
if
rm
in
env
.
nodes
or
rm
in
env
.
variables
:
env
.
revert
(
chk
)
out
=
sys
.
stderr
print
>>
out
,
(
"WARNING: An optimization wanted to replace a Variable"
" in the graph, but the replacement for it doesn't"
" remove it. We disabled the optimization."
" Your function runs correctly, but it would be"
" appreciated if you submit this problem to the mailing"
" list theano-users so that we can fix it."
)
print
>>
out
,
reason
,
replacements
if
warn
:
out
=
sys
.
stderr
print
>>
out
,
(
"WARNING: An optimization wanted to replace a Variable"
" in the graph, but the replacement for it doesn't"
" remove it. We disabled the optimization."
" Your function runs correctly, but it would be"
" appreciated if you submit this problem to the"
" mailing list theano-users so that we can fix it."
)
print
>>
out
,
reason
,
replacements
raise
ReplacementDidntRemovedError
()
...
...
theano/tensor/blas.py
浏览文件 @
e436106d
...
...
@@ -1335,7 +1335,8 @@ class GemmOptimizer(Optimizer):
env
.
replace_all_validate_remove
(
zip
(
node
.
outputs
,
new_outputs
),
[
old_dot22
],
reason
=
'GemmOptimizer'
reason
=
'GemmOptimizer'
,
warn
=
nb_replacement_didn_t_remove
==
0
)
did_something
=
True
break
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论