Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
edaab6c4
提交
edaab6c4
authored
2月 04, 2015
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not store in the node the stack trace as this is already in the var
上级
628d17de
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
0 行增加
和
18 行删除
+0
-18
debugmode.py
theano/compile/debugmode.py
+0
-3
function_module.py
theano/compile/function_module.py
+0
-6
op.py
theano/gof/op.py
+0
-9
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
edaab6c4
...
...
@@ -2226,17 +2226,14 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
# optimize the fgraph
compute_test_value_orig
=
theano
.
config
.
compute_test_value
add_stack_trace_on_call
=
gof
.
Op
.
add_stack_trace_on_call
try
:
theano
.
config
.
compute_test_value
=
theano
.
config
.
compute_test_value_opt
gof
.
Op
.
add_stack_trace_on_call
=
False
# Should it be 0 == i?
optimizer
(
fgraph
)
theano
.
compile
.
function_module
.
insert_deepcopy
(
fgraph
,
inputs
,
outputs
+
additional_outputs
)
finally
:
theano
.
config
.
compute_test_value
=
compute_test_value_orig
gof
.
Op
.
add_stack_trace_on_call
=
add_stack_trace_on_call
if
i
:
li
=
fgraph
.
equivalence_tracker
.
event_list
...
...
theano/compile/function_module.py
浏览文件 @
edaab6c4
...
...
@@ -1235,13 +1235,11 @@ class FunctionMaker(object):
optimizer
,
linker
=
mode
.
optimizer
,
copy
.
copy
(
mode
.
linker
)
if
need_opt
:
compute_test_value_orig
=
theano
.
config
.
compute_test_value
add_stack_trace_on_call_orig
=
gof
.
Op
.
add_stack_trace_on_call
limit_orig
=
theano
.
config
.
traceback
.
limit
# Why we add stack on node when it get done in output var?
try
:
# optimize the fgraph
theano
.
config
.
compute_test_value
=
theano
.
config
.
compute_test_value_opt
gof
.
Op
.
add_stack_trace_on_call
=
False
theano
.
config
.
traceback
.
limit
=
0
start_optimizer
=
time
.
time
()
...
...
@@ -1264,7 +1262,6 @@ class FunctionMaker(object):
insert_deepcopy
(
fgraph
,
inputs
,
outputs
+
additional_outputs
)
finally
:
theano
.
config
.
compute_test_value
=
compute_test_value_orig
gof
.
Op
.
add_stack_trace_on_call
=
add_stack_trace_on_call_orig
theano
.
config
.
traceback
.
limit
=
limit_orig
# initialize the linker
...
...
@@ -1411,15 +1408,12 @@ class FunctionMaker(object):
# Get a function instance
start_linker
=
time
.
time
()
start_import_time
=
theano
.
gof
.
cmodule
.
import_time
add_stack_trace_on_call_orig
=
gof
.
Op
.
add_stack_trace_on_call
limit_orig
=
theano
.
config
.
traceback
.
limit
try
:
gof
.
Op
.
add_stack_trace_on_call
=
False
theano
.
config
.
traceback
.
limit
=
0
_fn
,
_i
,
_o
=
self
.
linker
.
make_thunk
(
input_storage
=
input_storage_lists
)
finally
:
gof
.
Op
.
add_stack_trace_on_call
=
add_stack_trace_on_call_orig
theano
.
config
.
traceback
.
limit
=
limit_orig
end_linker
=
time
.
time
()
...
...
theano/gof/op.py
浏览文件 @
edaab6c4
...
...
@@ -413,13 +413,6 @@ class PureOp(object):
"""
add_stack_trace_on_call
=
True
"""This class variable governs whether __call__ adds a stack trace to the node it creates.
The tag trace is meant to connect a node to the line a user typed. It is nice for
debugging. It does not make as much sense during optimizations to store this information.
"""
#############
# make_node #
#############
...
...
@@ -486,8 +479,6 @@ class PureOp(object):
"""
return_list
=
kwargs
.
pop
(
'return_list'
,
False
)
node
=
self
.
make_node
(
*
inputs
,
**
kwargs
)
if
self
.
add_stack_trace_on_call
:
self
.
add_tag_trace
(
node
)
if
config
.
compute_test_value
!=
'off'
:
run_perform
=
True
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论