Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
597c5614
提交
597c5614
authored
2月 26, 2014
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
indent and add opt name in the opt, not just when registering it.
this make the name printed in more place.
上级
86d6b7d2
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
35 行增加
和
28 行删除
+35
-28
opt.py
theano/tensor/opt.py
+35
-28
没有找到文件。
theano/tensor/opt.py
浏览文件 @
597c5614
...
@@ -4073,20 +4073,22 @@ local_one_plus_erf = gof.PatternSub((T.add,
...
@@ -4073,20 +4073,22 @@ local_one_plus_erf = gof.PatternSub((T.add,
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
(
T
.
erf
,
'x'
)),
(
T
.
erf
,
'x'
)),
(
T
.
erfc
,
(
T
.
neg
,
'x'
)),
(
T
.
erfc
,
(
T
.
neg
,
'x'
)),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_one_plus_erf
,
name
=
'local_one_plus_erf'
)
name
=
'local_one_plus_erf'
)
register_stabilize
(
local_one_plus_erf
,
name
=
'local_one_plus_erf'
)
register_canonicalize
(
local_one_plus_erf
)
register_specialize
(
local_one_plus_erf
,
name
=
'local_one_plus_erf'
)
register_stabilize
(
local_one_plus_erf
)
register_specialize
(
local_one_plus_erf
)
#1-erf(x)=>erfc(x)
#1-erf(x)=>erfc(x)
local_one_minus_erf
=
gof
.
PatternSub
((
T
.
sub
,
local_one_minus_erf
=
gof
.
PatternSub
((
T
.
sub
,
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
(
T
.
erf
,
'x'
)),
(
T
.
erf
,
'x'
)),
(
T
.
erfc
,
'x'
),
(
T
.
erfc
,
'x'
),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_one_minus_erf
,
name
=
'local_one_minus_erf'
)
name
=
'local_one_minus_erf'
,)
register_stabilize
(
local_one_minus_erf
,
name
=
'local_one_minus_erf'
)
register_canonicalize
(
local_one_minus_erf
)
register_specialize
(
local_one_minus_erf
,
name
=
'local_one_minus_erf'
)
register_stabilize
(
local_one_minus_erf
)
register_specialize
(
local_one_minus_erf
)
local_one_minus_erf2
=
gof
.
PatternSub
((
T
.
add
,
local_one_minus_erf2
=
gof
.
PatternSub
((
T
.
add
,
1
,
1
,
...
@@ -4104,10 +4106,11 @@ local_one_plus_neg_erf = gof.PatternSub((T.add,
...
@@ -4104,10 +4106,11 @@ local_one_plus_neg_erf = gof.PatternSub((T.add,
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
(
T
.
neg
,
(
T
.
erf
,
'x'
))),
(
T
.
neg
,
(
T
.
erf
,
'x'
))),
(
T
.
erfc
,
'x'
),
(
T
.
erfc
,
'x'
),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_one_plus_neg_erf
,
name
=
'local_one_plus_neg_erf'
)
name
=
'local_one_plus_neg_erf'
)
register_stabilize
(
local_one_plus_neg_erf
,
name
=
'local_one_plus_neg_erf'
)
register_canonicalize
(
local_one_plus_neg_erf
)
register_specialize
(
local_one_plus_neg_erf
,
name
=
'local_one_plus_neg_erf'
)
register_stabilize
(
local_one_plus_neg_erf
)
register_specialize
(
local_one_plus_neg_erf
)
#(-1)+erf(x) => -erfc(x) don't need erf(x)+(-1) as the canonicalize
#(-1)+erf(x) => -erfc(x) don't need erf(x)+(-1) as the canonicalize
#will put the -1 as the first argument.
#will put the -1 as the first argument.
...
@@ -4115,20 +4118,22 @@ local_erf_minus_one = gof.PatternSub((T.add,
...
@@ -4115,20 +4118,22 @@ local_erf_minus_one = gof.PatternSub((T.add,
dict
(
pattern
=
'y'
,
constraint
=
_is_minus1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_minus1
),
(
T
.
erf
,
'x'
)),
(
T
.
erf
,
'x'
)),
(
T
.
neg
,
(
T
.
erfc
,
'x'
)),
(
T
.
neg
,
(
T
.
erfc
,
'x'
)),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_erf_minus_one
,
name
=
'local_erf_minus_one'
)
name
=
'local_erf_minus_one'
)
register_stabilize
(
local_erf_minus_one
,
name
=
'local_erf_minus_one'
)
register_canonicalize
(
local_erf_minus_one
)
register_specialize
(
local_erf_minus_one
,
name
=
'local_erf_minus_one'
)
register_stabilize
(
local_erf_minus_one
)
register_specialize
(
local_erf_minus_one
)
#1-erfc(x) => erf(x)
#1-erfc(x) => erf(x)
local_one_minus_erfc
=
gof
.
PatternSub
((
T
.
sub
,
local_one_minus_erfc
=
gof
.
PatternSub
((
T
.
sub
,
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
(
T
.
erfc
,
'x'
)),
(
T
.
erfc
,
'x'
)),
(
T
.
erf
,
'x'
),
(
T
.
erf
,
'x'
),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_one_minus_erfc
,
name
=
'local_one_minus_erfc'
)
name
=
'local_one_minus_erfc'
)
register_stabilize
(
local_one_minus_erfc
,
name
=
'local_one_minus_erfc'
)
register_canonicalize
(
local_one_minus_erfc
)
register_specialize
(
local_one_minus_erfc
,
name
=
'local_one_minus_erfc'
)
register_stabilize
(
local_one_minus_erfc
)
register_specialize
(
local_one_minus_erfc
)
local_one_minus_erfc2
=
gof
.
PatternSub
((
T
.
add
,
local_one_minus_erfc2
=
gof
.
PatternSub
((
T
.
add
,
1
,
1
,
...
@@ -4156,20 +4161,22 @@ local_one_add_neg_erfc = gof.PatternSub((T.add,
...
@@ -4156,20 +4161,22 @@ local_one_add_neg_erfc = gof.PatternSub((T.add,
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_1
),
(
T
.
neg
,
(
T
.
erfc
,
'x'
))),
(
T
.
neg
,
(
T
.
erfc
,
'x'
))),
(
T
.
erf
,
'x'
),
(
T
.
erf
,
'x'
),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_one_add_neg_erfc
,
name
=
'local_one_add_neg_erfc'
)
name
=
'local_one_add_neg_erfc'
)
register_stabilize
(
local_one_add_neg_erfc
,
name
=
'local_one_add_neg_erfc'
)
register_canonicalize
(
local_one_add_neg_erfc
)
register_specialize
(
local_one_add_neg_erfc
,
name
=
'local_one_add_neg_erfc'
)
register_stabilize
(
local_one_add_neg_erfc
)
register_specialize
(
local_one_add_neg_erfc
)
#(-1)+erfc(-x)=>erf(x)
#(-1)+erfc(-x)=>erf(x)
local_erf_neg_minus_one
=
gof
.
PatternSub
((
T
.
add
,
local_erf_neg_minus_one
=
gof
.
PatternSub
((
T
.
add
,
dict
(
pattern
=
'y'
,
constraint
=
_is_minus1
),
dict
(
pattern
=
'y'
,
constraint
=
_is_minus1
),
(
T
.
erfc
,
(
T
.
neg
,
'x'
))),
(
T
.
erfc
,
(
T
.
neg
,
'x'
))),
(
T
.
erf
,
'x'
),
(
T
.
erf
,
'x'
),
allow_multiple_clients
=
True
,)
allow_multiple_clients
=
True
,
register_canonicalize
(
local_erf_neg_minus_one
,
name
=
'local_erf_neg_minus_one'
)
name
=
'local_erf_neg_minus_one'
)
register_stabilize
(
local_erf_neg_minus_one
,
name
=
'local_erf_neg_minus_one'
)
register_canonicalize
(
local_erf_neg_minus_one
)
register_specialize
(
local_erf_neg_minus_one
,
name
=
'local_erf_neg_minus_one'
)
register_stabilize
(
local_erf_neg_minus_one
)
register_specialize
(
local_erf_neg_minus_one
)
#(-1)+erfc(-1*x)=>erf(x)
#(-1)+erfc(-1*x)=>erf(x)
local_erf_neg_minus_one2
=
gof
.
PatternSub
((
T
.
add
,
local_erf_neg_minus_one2
=
gof
.
PatternSub
((
T
.
add
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论