Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
d59aaf11
提交
d59aaf11
authored
7月 22, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Safer indexing. If we append more information, it will work correctly.
上级
58782af5
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
opt.py
theano/sparse/opt.py
+16
-16
没有找到文件。
theano/sparse/opt.py
浏览文件 @
d59aaf11
...
@@ -130,9 +130,9 @@ class StructuredDotCSC(gof.Op):
...
@@ -130,9 +130,9 @@ class StructuredDotCSC(gof.Op):
if
node
.
inputs
[
4
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
if
node
.
inputs
[
4
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
raise
NotImplementedError
(
'Complex types are not supported for b'
)
raise
NotImplementedError
(
'Complex types are not supported for b'
)
typenum_z
=
node
.
outputs
[
0
]
.
type
.
dtype_specs
()[
-
1
]
# retrieve dtype number
typenum_z
=
node
.
outputs
[
0
]
.
type
.
dtype_specs
()[
2
]
# retrieve dtype number
typenum_a_val
=
node
.
inputs
[
0
]
.
type
.
dtype_specs
()[
-
1
]
# retrieve dtype number
typenum_a_val
=
node
.
inputs
[
0
]
.
type
.
dtype_specs
()[
2
]
# retrieve dtype number
typenum_b
=
node
.
inputs
[
4
]
.
type
.
dtype_specs
()[
-
1
]
# retrieve dtype number
typenum_b
=
node
.
inputs
[
4
]
.
type
.
dtype_specs
()[
2
]
# retrieve dtype number
rval
=
"""
rval
=
"""
...
@@ -318,7 +318,7 @@ class StructuredDotCSR(gof.Op):
...
@@ -318,7 +318,7 @@ class StructuredDotCSR(gof.Op):
@param sub: TODO, not too sure, something to do with weave probably
@param sub: TODO, not too sure, something to do with weave probably
"""
"""
# retrieve dtype number
# retrieve dtype number
typenum_z
=
tensor
.
TensorType
(
self
.
dtype_out
,
[])
.
dtype_specs
()[
-
1
]
typenum_z
=
tensor
.
TensorType
(
self
.
dtype_out
,
[])
.
dtype_specs
()[
2
]
if
node
.
inputs
[
0
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
if
node
.
inputs
[
0
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
raise
NotImplementedError
(
'Complex types are not supported for a_val'
)
raise
NotImplementedError
(
'Complex types are not supported for a_val'
)
if
node
.
inputs
[
3
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
if
node
.
inputs
[
3
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
...
@@ -550,11 +550,11 @@ class UsmmCscDense(gof.Op):
...
@@ -550,11 +550,11 @@ class UsmmCscDense(gof.Op):
conv_type
=
"double"
conv_type
=
"double"
axpy
=
"daxpy_"
axpy
=
"daxpy_"
# retrieve dtype numbers
# retrieve dtype numbers
typenum_alpha
=
node
.
inputs
[
0
]
.
type
.
dtype_specs
()[
-
1
]
typenum_alpha
=
node
.
inputs
[
0
]
.
type
.
dtype_specs
()[
2
]
typenum_x_val
=
node
.
inputs
[
1
]
.
type
.
dtype_specs
()[
-
1
]
typenum_x_val
=
node
.
inputs
[
1
]
.
type
.
dtype_specs
()[
2
]
typenum_y
=
node
.
inputs
[
5
]
.
type
.
dtype_specs
()[
-
1
]
typenum_y
=
node
.
inputs
[
5
]
.
type
.
dtype_specs
()[
2
]
typenum_z
=
node
.
inputs
[
6
]
.
type
.
dtype_specs
()[
-
1
]
typenum_z
=
node
.
inputs
[
6
]
.
type
.
dtype_specs
()[
2
]
typenum_zn
=
node
.
outputs
[
0
]
.
type
.
dtype_specs
()[
-
1
]
typenum_zn
=
node
.
outputs
[
0
]
.
type
.
dtype_specs
()[
2
]
inplace
=
int
(
self
.
inplace
)
inplace
=
int
(
self
.
inplace
)
...
@@ -761,7 +761,7 @@ class CSMGradC(gof.Op):
...
@@ -761,7 +761,7 @@ class CSMGradC(gof.Op):
def
c_code
(
self
,
node
,
name
,
(
a_val
,
a_ind
,
a_ptr
,
a_dim
,
def
c_code
(
self
,
node
,
name
,
(
a_val
,
a_ind
,
a_ptr
,
a_dim
,
b_val
,
b_ind
,
b_ptr
,
b_dim
),
(
z
,),
sub
):
b_val
,
b_ind
,
b_ptr
,
b_dim
),
(
z
,),
sub
):
# retrieve dtype number
# retrieve dtype number
typenum_z
=
node
.
outputs
[
0
]
.
type
.
dtype_specs
()[
-
1
]
typenum_z
=
node
.
outputs
[
0
]
.
type
.
dtype_specs
()[
2
]
if
node
.
inputs
[
0
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
if
node
.
inputs
[
0
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
raise
NotImplementedError
(
'Complex types are not supported for a_val'
)
raise
NotImplementedError
(
'Complex types are not supported for a_val'
)
if
node
.
inputs
[
3
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
if
node
.
inputs
[
3
]
.
type
.
dtype
in
(
'complex64'
,
'complex128'
):
...
@@ -1558,15 +1558,15 @@ class SamplingDotCSR(gof.Op):
...
@@ -1558,15 +1558,15 @@ class SamplingDotCSR(gof.Op):
cdot
=
"ddot_"
cdot
=
"ddot_"
# retrieve dtype number
# retrieve dtype number
typenum_x
=
node
.
inputs
[
0
]
.
type
.
dtype_specs
()[
-
1
]
typenum_x
=
node
.
inputs
[
0
]
.
type
.
dtype_specs
()[
2
]
typenum_y
=
node
.
inputs
[
1
]
.
type
.
dtype_specs
()[
-
1
]
typenum_y
=
node
.
inputs
[
1
]
.
type
.
dtype_specs
()[
2
]
typenum_p
=
node
.
inputs
[
2
]
.
type
.
dtype_specs
()[
-
1
]
typenum_p
=
node
.
inputs
[
2
]
.
type
.
dtype_specs
()[
2
]
typenum_zd
=
tensor
.
TensorType
(
node
.
outputs
[
0
]
.
dtype
,
typenum_zd
=
tensor
.
TensorType
(
node
.
outputs
[
0
]
.
dtype
,
[])
.
dtype_specs
()[
-
1
]
[])
.
dtype_specs
()[
2
]
typenum_zi
=
tensor
.
TensorType
(
node
.
outputs
[
1
]
.
dtype
,
typenum_zi
=
tensor
.
TensorType
(
node
.
outputs
[
1
]
.
dtype
,
[])
.
dtype_specs
()[
-
1
]
[])
.
dtype_specs
()[
2
]
typenum_zp
=
tensor
.
TensorType
(
node
.
outputs
[
2
]
.
dtype
,
typenum_zp
=
tensor
.
TensorType
(
node
.
outputs
[
2
]
.
dtype
,
[])
.
dtype_specs
()[
-
1
]
[])
.
dtype_specs
()[
2
]
rval
=
"""
rval
=
"""
if (PyArray_NDIM(
%(x)
s) != 2) {
if (PyArray_NDIM(
%(x)
s) != 2) {
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论