Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7b507e2b
提交
7b507e2b
authored
7月 30, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add an option to have a warning printed about the vm/cvm gc bug.
上级
f114b86c
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
27 行增加
和
1 行删除
+27
-1
configdefaults.py
theano/configdefaults.py
+11
-0
vm.py
theano/gof/vm.py
+16
-1
没有找到文件。
theano/configdefaults.py
浏览文件 @
7b507e2b
...
@@ -339,6 +339,17 @@ AddConfigVar('warn.gpu_set_subtensor1',
...
@@ -339,6 +339,17 @@ AddConfigVar('warn.gpu_set_subtensor1',
BoolParam
(
warn_default
(
'0.6'
)),
BoolParam
(
warn_default
(
'0.6'
)),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'warn.vm_gc_bug'
,
"There was a bug that existed in the default Theano configuration"
" just in the development version between July 5 2012"
" and July 30 2012. This was not in a released version."
" If your code was affected by this bug, a warning"
" will be printed during the code execution if you use the"
"`linker=vm,vm.lazy=True,warn.vm_gc_bug=True` Theano flags."
"This warning is diabled by default as it was not released."
,
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'compute_test_value'
,
AddConfigVar
(
'compute_test_value'
,
(
"If 'True', Theano will run each op at graph build time, using "
(
"If 'True', Theano will run each op at graph build time, using "
"Constants, SharedVariables and the tag 'test_value' as inputs "
"Constants, SharedVariables and the tag 'test_value' as inputs "
...
...
theano/gof/vm.py
浏览文件 @
7b507e2b
...
@@ -3,10 +3,12 @@ VMs that run Theano graph computations.
...
@@ -3,10 +3,12 @@ VMs that run Theano graph computations.
A VM is not actually different from a Linker, we just decided
A VM is not actually different from a Linker, we just decided
VM was a better name at some point
VM was a better name at some point
"""
"""
import
link
import
logging
import
logging
import
sys
import
sys
import
time
import
time
import
link
import
warnings
from
theano.gof.python25
import
all
from
theano.gof.python25
import
all
import
theano
import
theano
...
@@ -396,6 +398,19 @@ class Stack(VM):
...
@@ -396,6 +398,19 @@ class Stack(VM):
#recomputed! This can cause wrong value
#recomputed! This can cause wrong value
#with some combiation of inplace op.
#with some combiation of inplace op.
compute_map
[
i
][
0
]
=
2
compute_map
[
i
][
0
]
=
2
if
(
config
.
warn
.
vm_gc_bug
and
current_apply
in
apply_stack
and
getattr
(
current_apply
.
op
,
'destroy_map'
,
False
)):
warnings
.
warn
(
"There was bug that existed in the default Theano configuration"
" just in the development version between July 5 2012"
" and July 30 2012. This was not in a released version."
"The bug was affecting this script."
,
#The stack level is not good when inside a Scan.
stacklevel
=
3
)
elif
not
computed_ins
:
elif
not
computed_ins
:
# -- Non-lazy case, need inputs
# -- Non-lazy case, need inputs
apply_stack
.
append
(
current_apply
)
apply_stack
.
append
(
current_apply
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论