Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
8a855c90
提交
8a855c90
authored
8月 05, 2012
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Typo fixes
上级
5a0b9a89
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
11 行删除
+10
-11
configdefaults.py
theano/configdefaults.py
+4
-4
test_vm.py
theano/gof/tests/test_vm.py
+2
-3
vm.py
theano/gof/vm.py
+4
-4
没有找到文件。
theano/configdefaults.py
浏览文件 @
8a855c90
...
...
@@ -120,10 +120,10 @@ del dummy_stdin
#Keep the default optimizer the same as the one for the mode FAST_RUN
AddConfigVar
(
'allow_gc'
,
"Do we default to delete intermediate results during Theano"
" function call
? Doing so lower the memory requirement, but ask
"
" that we reallocate memory at the next function call."
" This is implemented for the default linker, but
not work all
"
"
linker
"
,
" function call
s? Doing so lowers the memory requirement, but
"
"
asks
that we reallocate memory at the next function call."
" This is implemented for the default linker, but
may not work
"
"
for all linkers.
"
,
BoolParam
(
True
),
in_c_key
=
False
)
...
...
theano/gof/tests/test_vm.py
浏览文件 @
8a855c90
...
...
@@ -295,11 +295,10 @@ class RunOnce(theano.Op):
def
test_vm_gc
():
"""This already caused a bug in the trunk of Theano.
The bug was introduced in the trunk
the July 5, 2012 and fixed the
July 30
The bug was introduced in the trunk
on July 5th, 2012 and fixed on
July 30
th.
"""
pass
x
=
theano
.
tensor
.
vector
()
p
=
RunOnce
()(
x
)
mode
=
theano
.
Mode
(
linker
=
theano
.
gof
.
vm
.
VM_Linker
(
lazy
=
True
))
...
...
theano/gof/vm.py
浏览文件 @
8a855c90
...
...
@@ -40,7 +40,7 @@ def filter_vm_lazy(val):
AddConfigVar
(
'vm.lazy'
,
"Useful only for the vm linkers. When lazy is None,"
" auto detect if lazy evaluation is needed and use the apropriate"
" version. If lazy i
t
True/False, force the version used between"
" version. If lazy i
s
True/False, force the version used between"
" Loop/LoopGC and Stack."
,
ConfigParam
(
'None'
,
filter_vm_lazy
))
...
...
@@ -396,7 +396,7 @@ class Stack(VM):
#current_apply is still in the
#stack, this will cause it to be
#recomputed! This can cause wrong value
#with some combiation of inplace op.
#with some combi
n
ation of inplace op.
compute_map
[
i
][
0
]
=
2
if
(
config
.
warn
.
vm_gc_bug
and
current_apply
in
apply_stack
and
...
...
@@ -471,7 +471,7 @@ class Stack(VM):
if
empty_storage_map
:
storage_map
[
i
][
0
]
=
None
#See the not lazy gc code for explanations
#
O
f compute_map change
#
o
f compute_map change
compute_map
[
i
][
0
]
=
2
# Hacky coarse gc final pass
...
...
@@ -513,7 +513,7 @@ class VM_Linker(link.LocalLinker):
allow_gc - force the virtual machine to clean up unnecessary
references, in order to allow garbage collection on
intermediate values during computation of a function.
If None use as default the
Theano flag allow_gc value
.
If None use as default the
value of the Theano flag allow_gc
.
use_cloop - use the C-based virtual machine if possible
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论