Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2f673bcb
提交
2f673bcb
authored
7月 28, 2017
作者:
Reyhane Askari
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix for docs and other minor fixes
上级
f54ad560
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
25 行增加
和
7 行删除
+25
-7
config.txt
doc/library/config.txt
+15
-0
mode.py
theano/compile/mode.py
+4
-3
configdefaults.py
theano/configdefaults.py
+4
-2
opt.py
theano/gof/opt.py
+2
-2
没有找到文件。
doc/library/config.txt
浏览文件 @
2f673bcb
...
...
@@ -255,6 +255,21 @@ import theano and print the config variable, as in:
not predictable, so if you are close to the peak memory usage, trying both
could give you a small gain.
.. attribute:: check_stack_trace
String value, either ``off``, ``log``, ``warn``, ``raise``
Default: ``off``
This is a flag for checking the stack trace during the optimization process.
If :attr:`check_stack_trace` is set to ``off``, no check is performed on the
stack trace. If :attr:`check_stack_trace` is set to ``log`` or ``warn``, a
dummy stack trace is inserted that indicates which optimization inserted the
variable that had an empty stack trace but, in ``warn`` a warning is also
printed.
If :attr:`check_stack_trace` is set to ``raise``, an exception is raised if a
stack trace is missing.
.. attribute:: openmp
Bool value: either ``True`` or ``False``
...
...
theano/compile/mode.py
浏览文件 @
2f673bcb
...
...
@@ -227,13 +227,14 @@ optdb.register('merge3', gof.MergeOptimizer(),
100
,
'fast_run'
,
'merge'
)
if
theano
.
config
.
check_stack_trace
in
[
'raise'
,
'warn'
,
'log'
]:
tags
=
(
'fast_run'
,
'fast_compile'
)
_
tags
=
(
'fast_run'
,
'fast_compile'
)
if
theano
.
config
.
check_stack_trace
==
'off'
:
tags
=
()
_
tags
=
()
optdb
.
register
(
'CheckStackTrace'
,
gof
.
CheckStackTraceOptimization
(),
-
1
,
*
tags
)
gof
.
CheckStackTraceOptimization
(),
-
1
,
*
_tags
)
del
_tags
class
Mode
(
object
):
...
...
theano/configdefaults.py
浏览文件 @
2f673bcb
...
...
@@ -1509,8 +1509,10 @@ AddConfigVar('check_stack_trace',
"A flag for checking the stack trace during the optimization process. "
"default (off): does not check the stack trace of any optimization "
"log: inserts a dummy stack trace that identifies the optimization"
"that inserted that variable."
"warn: prints a warning if a stack trace is missing"
"that inserted the variable that had an empty stack trace."
"warn: prints a warning if a stack trace is missing and also a dummy"
"stack trace is inserted that indicates which optimization inserted"
"the variable that had an empty stack trace."
"raise: raises an exception if a stack trace is missing"
,
EnumStr
(
'off'
,
'log'
,
'warn'
,
'raise'
),
in_c_key
=
False
)
...
...
theano/gof/opt.py
浏览文件 @
2f673bcb
...
...
@@ -3047,8 +3047,8 @@ class CheckStrackTraceFeature(object):
# theano.config.check_stack_trace is not off but we also double check here.
if
theano
.
config
.
check_stack_trace
!=
'off'
and
not
check_stack_trace
(
fgraph
,
'all'
):
if
theano
.
config
.
check_stack_trace
==
'raise'
:
raise
NotImplemented
Error
(
'Empty stack trace! The optimization that inserted this variable is'
+
str
(
reason
))
raise
Assertion
Error
(
'Empty stack trace! The optimization that inserted this variable is
'
+
str
(
reason
))
elif
theano
.
config
.
check_stack_trace
in
[
'log'
,
'warn'
]:
apply_nodes_to_check
=
fgraph
.
apply_nodes
for
node
in
apply_nodes_to_check
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论