Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7cf5b30d
提交
7cf5b30d
authored
6月 15, 2017
作者:
Reyhane Askari
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
outputgruard check added to debugmode
上级
2e62dd59
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
4 行删除
+16
-4
debugmode.py
theano/compile/debugmode.py
+13
-1
mode.py
theano/compile/mode.py
+3
-3
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
7cf5b30d
...
@@ -27,7 +27,8 @@ from theano.compile.function_module import (
...
@@ -27,7 +27,8 @@ from theano.compile.function_module import (
FunctionMaker
,
Function
,
infer_reuse_pattern
,
FunctionMaker
,
Function
,
infer_reuse_pattern
,
SymbolicOutput
,
Supervisor
,
std_fgraph
)
SymbolicOutput
,
Supervisor
,
std_fgraph
)
from
theano.compile.mode
import
Mode
,
register_mode
from
theano.compile.mode
import
Mode
,
register_mode
from
theano.compile.ops
import
OutputGuard
from
theano.compile.ops
import
OutputGuard
,
_output_guard
__docformat__
=
"restructuredtext en"
__docformat__
=
"restructuredtext en"
_logger
=
logging
.
getLogger
(
"theano.compile.debugmode"
)
_logger
=
logging
.
getLogger
(
"theano.compile.debugmode"
)
...
@@ -2311,6 +2312,17 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
...
@@ -2311,6 +2312,17 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
"of"
,
len
(
li
),
"events was stable."
,
"of"
,
len
(
li
),
"events was stable."
,
file
=
sys
.
stderr
)
file
=
sys
.
stderr
)
self
.
fgraph
=
fgraph
self
.
fgraph
=
fgraph
for
o
in
fgraph
.
outputs
:
try
:
fgraph
.
replace_validate
(
o
,
_output_guard
(
o
),
reason
=
'output_guard'
)
raise
Exception
(
"Output variable
%
s required output_guard, "
"how was this output left unprotected against "
"destructive operations?"
%
o
)
except
gof
.
InconsistencyError
:
# This output is already impossible to destroy.
# No guard necessary
pass
linker
=
_Linker
(
self
)
linker
=
_Linker
(
self
)
...
...
theano/compile/mode.py
浏览文件 @
7cf5b30d
...
@@ -118,9 +118,9 @@ class AddDestroyHandler(gof.Optimizer):
...
@@ -118,9 +118,9 @@ class AddDestroyHandler(gof.Optimizer):
supervisor_added
=
True
supervisor_added
=
True
break
break
if
not
supervisor_added
:
if
not
supervisor_added
:
warnings
.
warn
(
"WARNING: Supervisor is not added. Please
do not
"
warnings
.
warn
(
"WARNING: Supervisor is not added. Please
build a FunctionGraph
"
"
use some_op.optimize(fgraph). Instead use theano.function
"
"
via theano.compile.function_module.std_graph()
"
"
to add the optimiztions
."
,
"
or add the Supervisor class manually
."
,
stacklevel
=
3
)
stacklevel
=
3
)
def
add_requirements
(
self
,
fgraph
):
def
add_requirements
(
self
,
fgraph
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论