Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4fca63f6
提交
4fca63f6
authored
7月 27, 2012
作者:
Nicolas Bouchard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add new elemwises.
上级
98309232
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
107 行增加
和
0 行删除
+107
-0
basic.py
theano/sparse/basic.py
+107
-0
test_basic.py
theano/sparse/tests/test_basic.py
+0
-0
没有找到文件。
theano/sparse/basic.py
浏览文件 @
4fca63f6
...
@@ -3137,6 +3137,7 @@ def structured_monoid(tensor_op):
...
@@ -3137,6 +3137,7 @@ def structured_monoid(tensor_op):
data
=
tensor_op
(
data
,
*
xs
)
data
=
tensor_op
(
data
,
*
xs
)
return
CSM
(
x
.
format
)(
data
,
ind
,
ptr
,
shape
)
return
CSM
(
x
.
format
)(
data
,
ind
,
ptr
,
shape
)
wrapper
.
__name__
=
str
(
tensor_op
.
scalar_op
)
return
wrapper
return
wrapper
return
decorator
return
decorator
...
@@ -3194,6 +3195,112 @@ def structured_add(x):
...
@@ -3194,6 +3195,112 @@ def structured_add(x):
# see decorator for function body
# see decorator for function body
# Sparse operation (map 0 to 0)
@structured_monoid
(
tensor
.
sin
)
def
sin
(
x
):
"""Elemwise sinus of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
tan
)
def
tan
(
x
):
"""Elemwise tan of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
arcsin
)
def
arcsin
(
x
):
"""Elemwise arcsinus of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
arctan
)
def
arctan
(
x
):
"""Elemwise arctan of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
sinh
)
def
sinh
(
x
):
"""Elemwise sinh of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
arcsinh
)
def
arcsinh
(
x
):
"""Elemwise arcsinh of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
tanh
)
def
tanh
(
x
):
"""Elemwise tanh of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
arctanh
)
def
arctanh
(
x
):
"""Elemwise arctanh of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
round_half_to_even
)
def
rint
(
x
):
"""Elemwise round half to even of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
sgn
)
def
sgn
(
x
):
"""Elemwise signe of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
ceil
)
def
ceil
(
x
):
"""Elemwise ceiling of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
floor
)
def
floor
(
x
):
"""Elemwise floor of `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
log1p
)
def
log1p
(
x
):
"""Elemwise log(1 + `x`).
"""
# see decorator for function body
@structured_monoid
(
tensor
.
sqr
)
def
sqr
(
x
):
"""Elemwise `x` * `x`.
"""
# see decorator for function body
@structured_monoid
(
tensor
.
sqrt
)
def
sqrt
(
x
):
"""Elemwise square root of `x`.
"""
# see decorator for function body
# Dot
# Dot
class
StructuredDot
(
gof
.
Op
):
class
StructuredDot
(
gof
.
Op
):
"""Structured Dot is like dot, except that only the
"""Structured Dot is like dot, except that only the
...
...
theano/sparse/tests/test_basic.py
浏览文件 @
4fca63f6
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论