Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
c1ebb2fd
提交
c1ebb2fd
authored
4月 22, 2015
作者:
abergeron
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2804 from nouiz/consistency
Fix some different behavior depending with not default mode.
上级
cda18cf5
2dc1826a
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
6 行增加
和
2 行删除
+6
-2
vm.py
theano/gof/vm.py
+6
-2
没有找到文件。
theano/gof/vm.py
浏览文件 @
c1ebb2fd
...
@@ -245,6 +245,8 @@ class Loop(VM):
...
@@ -245,6 +245,8 @@ class Loop(VM):
Unconditional start-to-finish program execution in Python.
Unconditional start-to-finish program execution in Python.
No garbage collection is allowed on intermediate results.
No garbage collection is allowed on intermediate results.
"""
"""
# Some other part of Theano query that information
allow_gc
=
False
def
__call__
(
self
):
def
__call__
(
self
):
if
self
.
time_thunks
:
if
self
.
time_thunks
:
...
@@ -280,6 +282,8 @@ class LoopGC(VM):
...
@@ -280,6 +282,8 @@ class LoopGC(VM):
def
__init__
(
self
,
nodes
,
thunks
,
pre_call_clear
,
post_thunk_clear
):
def
__init__
(
self
,
nodes
,
thunks
,
pre_call_clear
,
post_thunk_clear
):
super
(
LoopGC
,
self
)
.
__init__
(
nodes
,
thunks
,
pre_call_clear
)
super
(
LoopGC
,
self
)
.
__init__
(
nodes
,
thunks
,
pre_call_clear
)
self
.
post_thunk_clear
=
post_thunk_clear
self
.
post_thunk_clear
=
post_thunk_clear
# Some other part of Theano query that information
self
.
allow_gc
=
True
if
not
(
len
(
nodes
)
==
len
(
thunks
)
==
len
(
post_thunk_clear
)):
if
not
(
len
(
nodes
)
==
len
(
thunks
)
==
len
(
post_thunk_clear
)):
raise
ValueError
()
raise
ValueError
()
...
@@ -809,7 +813,7 @@ class VM_Linker(link.LocalLinker):
...
@@ -809,7 +813,7 @@ class VM_Linker(link.LocalLinker):
if
self
.
use_cloop
and
config
.
profile_memory
:
if
self
.
use_cloop
and
config
.
profile_memory
:
warnings
.
warn
(
warnings
.
warn
(
'CVM does not support memory profile, using Stack VM.'
)
'CVM does not support memory profile, using Stack VM.'
)
# Needed
when allow_gc=True and profiling
# Needed
for allow_gc=True, profiling and storage_map reuse
deps
=
self
.
compute_gc_dependencies
(
storage_map
)
deps
=
self
.
compute_gc_dependencies
(
storage_map
)
vm
=
Stack
(
vm
=
Stack
(
nodes
,
thunks
,
pre_call_clear
,
nodes
,
thunks
,
pre_call_clear
,
...
@@ -845,7 +849,7 @@ class VM_Linker(link.LocalLinker):
...
@@ -845,7 +849,7 @@ class VM_Linker(link.LocalLinker):
assert
type
(
storage_map_list
[
0
])
is
list
assert
type
(
storage_map_list
[
0
])
is
list
assert
type
(
compute_map_list
[
0
])
is
list
assert
type
(
compute_map_list
[
0
])
is
list
# Needed
when allow_gc=True and profiling
# Needed
for allow_gc=True, profiling and storage_map reuse
dependency_map
=
self
.
compute_gc_dependencies
(
storage_map
)
dependency_map
=
self
.
compute_gc_dependencies
(
storage_map
)
dependency_map_list
=
[
dependency_map_list
=
[
[
vars_idx
[
d
]
for
d
in
dependency_map
[
vars_idx_inv
[
i
]]]
[
vars_idx
[
d
]
for
d
in
dependency_map
[
vars_idx_inv
[
i
]]]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论