Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
948c6813
提交
948c6813
authored
6月 29, 2011
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Hack to make Composite Ops compare equal when theano.config has changed
上级
4e80f755
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
21 行增加
和
7 行删除
+21
-7
debugmode.py
theano/compile/debugmode.py
+12
-6
basic.py
theano/scalar/basic.py
+9
-1
没有找到文件。
theano/compile/debugmode.py
浏览文件 @
948c6813
...
...
@@ -23,29 +23,35 @@ from theano.compile.mode import Mode, register_mode
AddConfigVar
(
'DebugMode.patience'
,
"Optimize graph this many times to detect inconsistency"
,
IntParam
(
10
,
lambda
i
:
i
>
0
))
IntParam
(
10
,
lambda
i
:
i
>
0
),
in_c_key
=
False
)
AddConfigVar
(
'DebugMode.check_c'
,
"Run C implementations where possible"
,
BoolParam
(
True
))
BoolParam
(
True
),
in_c_key
=
False
)
AddConfigVar
(
'DebugMode.check_py'
,
"Run Python implementations where possible"
,
BoolParam
(
True
))
BoolParam
(
True
),
in_c_key
=
False
)
AddConfigVar
(
'DebugMode.check_finite'
,
"True -> complain about NaN/Inf results"
,
BoolParam
(
True
))
BoolParam
(
True
),
in_c_key
=
False
)
AddConfigVar
(
'DebugMode.check_strides'
,
(
"Check that Python- and C-produced ndarrays have same strides. "
"On difference: (0) - ignore, (1) warn, or (2) raise error"
),
IntParam
(
1
,
lambda
i
:
i
in
(
0
,
1
,
2
)))
IntParam
(
1
,
lambda
i
:
i
in
(
0
,
1
,
2
)),
in_c_key
=
False
)
AddConfigVar
(
'DebugMode.warn_input_not_reused'
,
(
"Generate a warning when the destroy_map or view_map tell that an op work inplace, but the op did not reuse the input for its output."
),
BoolParam
(
True
))
BoolParam
(
True
),
in_c_key
=
False
)
def
is_valid_check_preallocated_output_param
(
param
):
if
not
isinstance
(
param
,
str
):
...
...
theano/scalar/basic.py
浏览文件 @
948c6813
...
...
@@ -2062,7 +2062,15 @@ class Composite(ScalarOp):
#TODO: What no_recycling is used for? What I need to put their?
# no_recycling = []
self
.
_cmodule_key
=
gof
.
CLinker
.
cmodule_key_
(
self
.
env
,
[])
self
.
_hashval
=
hash
(
self
.
_cmodule_key
)
# Remove the config md5 from _hashval
# This is a temporary fix so that _hashval does not change when
# the Op is pickled and unpickled.
cmkey
=
list
(
self
.
_cmodule_key
)
cmkey1
=
list
(
cmkey
[
1
])
assert
isinstance
(
cmkey1
[
3
],
str
)
and
cmkey1
[
3
]
.
startswith
(
'md5:'
)
del
cmkey1
[
3
]
cmkey
[
1
]
=
tuple
(
cmkey1
)
self
.
_hashval
=
hash
(
tuple
(
cmkey
))
def
__hash__
(
self
):
return
self
.
_hashval
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论