Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
aa2a430b
提交
aa2a430b
authored
5月 03, 2016
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Theano flag scan.debug=False.
上级
70e866cd
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
0 行删除
+22
-0
config.txt
doc/library/config.txt
+8
-0
configdefaults.py
theano/configdefaults.py
+5
-0
toolbox.py
theano/gof/toolbox.py
+9
-0
没有找到文件。
doc/library/config.txt
浏览文件 @
aa2a430b
...
@@ -239,6 +239,14 @@ import theano and print the config variable, as in:
...
@@ -239,6 +239,14 @@ import theano and print the config variable, as in:
``False``, then we will gc the inner of scan after all
``False``, then we will gc the inner of scan after all
iterations. This is the default.
iterations. This is the default.
.. attribute:: config.scan.debug
Bool value, either ``True`` or ``False``
Default: ``False``
If True, we will print extra scan debug information.
.. attribute:: openmp
.. attribute:: openmp
Bool value: either True or False
Bool value: either True or False
...
...
theano/configdefaults.py
浏览文件 @
aa2a430b
...
@@ -1427,6 +1427,11 @@ AddConfigVar('scan.allow_output_prealloc',
...
@@ -1427,6 +1427,11 @@ AddConfigVar('scan.allow_output_prealloc',
BoolParam
(
True
),
BoolParam
(
True
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'scan.debug'
,
"If True, enable extra verbose output related to scan"
,
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'pycuda.init'
,
AddConfigVar
(
'pycuda.init'
,
"""If True, always initialize PyCUDA when Theano want to
"""If True, always initialize PyCUDA when Theano want to
initilize the GPU. Currently, we must always initialize
initilize the GPU. Currently, we must always initialize
...
...
theano/gof/toolbox.py
浏览文件 @
aa2a430b
...
@@ -304,6 +304,9 @@ class ReplaceValidate(History, Validator):
...
@@ -304,6 +304,9 @@ class ReplaceValidate(History, Validator):
chk
=
fgraph
.
checkpoint
()
chk
=
fgraph
.
checkpoint
()
if
verbose
is
None
:
if
verbose
is
None
:
verbose
=
config
.
optimizer_verbose
verbose
=
config
.
optimizer_verbose
if
config
.
scan
.
debug
:
nb
=
len
([
n
for
n
in
fgraph
.
apply_nodes
if
isinstance
(
n
.
op
,
theano
.
scan_module
.
scan_op
.
Scan
)])
for
r
,
new_r
in
replacements
:
for
r
,
new_r
in
replacements
:
try
:
try
:
fgraph
.
replace
(
r
,
new_r
,
reason
=
reason
,
verbose
=
False
)
fgraph
.
replace
(
r
,
new_r
,
reason
=
reason
,
verbose
=
False
)
...
@@ -337,6 +340,12 @@ class ReplaceValidate(History, Validator):
...
@@ -337,6 +340,12 @@ class ReplaceValidate(History, Validator):
if
verbose
:
if
verbose
:
print
(
"validate failed on node
%
s.
\n
Reason:
%
s,
%
s"
%
(
r
,
reason
,
e
))
print
(
"validate failed on node
%
s.
\n
Reason:
%
s,
%
s"
%
(
r
,
reason
,
e
))
raise
raise
if
config
.
scan
.
debug
:
nb2
=
len
([
n
for
n
in
fgraph
.
apply_nodes
if
isinstance
(
n
.
op
,
theano
.
scan_module
.
scan_op
.
Scan
)])
if
nb2
>
nb
:
print
(
"Extra scan introduced"
,
nb
,
nb2
,
getattr
(
reason
,
'name'
,
reason
),
r
,
new_r
)
elif
nb2
<
nb
:
print
(
"Scan removed"
,
nb
,
nb2
,
getattr
(
reason
,
'name'
,
reason
),
r
,
new_r
)
if
verbose
:
if
verbose
:
print
(
reason
,
r
,
new_r
)
print
(
reason
,
r
,
new_r
)
# The return is needed by replace_all_validate_remove
# The return is needed by replace_all_validate_remove
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论