Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e5fdd8a8
提交
e5fdd8a8
authored
8月 31, 2011
作者:
James Bergstra
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13 from nouiz/interactive_debuger_fix
Disable interactive debugger when inserting deep copy.
上级
1e6e8c1d
e0e7382a
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
4 行删除
+16
-4
debugmode.py
theano/compile/debugmode.py
+2
-2
function_module.py
theano/compile/function_module.py
+2
-2
test_compute_test_value.py
theano/gof/tests/test_compute_test_value.py
+12
-0
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
e5fdd8a8
...
...
@@ -1655,10 +1655,10 @@ class _Maker(FunctionMaker): #inheritance buys a few helper functions
try
:
theano
.
config
.
compute_test_value
=
"off"
optimizer
(
env
)
finally
:
theano
.
config
.
compute_test_value
=
compute_test_value_orig
theano
.
compile
.
function_module
.
insert_deepcopy
(
env
,
inputs
,
outputs
+
additional_outputs
)
finally
:
theano
.
config
.
compute_test_value
=
compute_test_value_orig
if
i
:
li
=
env
.
equivalence_tracker
.
event_list
...
...
theano/compile/function_module.py
浏览文件 @
e5fdd8a8
...
...
@@ -995,8 +995,6 @@ class FunctionMaker(object):
start_optimizer
=
time
.
time
()
optimizer
(
env
)
end_optimizer
=
time
.
time
()
finally
:
theano
.
config
.
compute_test_value
=
compute_test_value_orig
opt_time
=
end_optimizer
-
start_optimizer
mode
.
optimizer_time
+=
opt_time
...
...
@@ -1006,6 +1004,8 @@ class FunctionMaker(object):
#Add deep copy to respect the memory interface
insert_deepcopy
(
env
,
inputs
,
outputs
+
additional_outputs
)
finally
:
theano
.
config
.
compute_test_value
=
compute_test_value_orig
# initialize the linker
if
not
hasattr
(
linker
,
'accept'
):
...
...
theano/gof/tests/test_compute_test_value.py
浏览文件 @
e5fdd8a8
...
...
@@ -372,3 +372,15 @@ class TestComputeTestValue(unittest.TestCase):
finally
:
theano
.
config
.
compute_test_value
=
orig_compute_test_value
def
test_disabled_during_compilation
(
self
):
# We test that it is disabled when we include deep copy in the code
# This don't test that it is disabled during optimization, but the code do it.
orig_compute_test_value
=
theano
.
config
.
compute_test_value
try
:
theano
.
config
.
compute_test_value
=
'raise'
init_Mu1
=
theano
.
shared
(
numpy
.
zeros
((
5
,),
dtype
=
config
.
floatX
))
.
dimshuffle
(
'x'
,
0
)
f
=
theano
.
function
([],
outputs
=
[
init_Mu1
])
finally
:
theano
.
config
.
compute_test_value
=
orig_compute_test_value
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论