Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
42ba5a5d
提交
42ba5a5d
authored
3月 13, 2009
作者:
james@X40
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added shortcuts for complex tensor types
上级
24f4ad19
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
0 行删除
+14
-0
basic.py
theano/tensor/basic.py
+14
-0
没有找到文件。
theano/tensor/basic.py
浏览文件 @
42ba5a5d
...
...
@@ -407,6 +407,8 @@ def _multi(*fns):
else
:
return
[
partial
(
f2
,
f
)
for
f
in
fns
]
cscalar
=
Tensor
(
'complex64'
,
())
zscalar
=
Tensor
(
'complex128'
,
())
fscalar
=
Tensor
(
'float32'
,
())
dscalar
=
Tensor
(
'float64'
,
())
bscalar
=
Tensor
(
'int8'
,
())
...
...
@@ -420,9 +422,13 @@ scalars, fscalars, dscalars, iscalars, lscalars = _multi(scalar, fscalar, dscala
int_types
=
bscalar
,
wscalar
,
iscalar
,
lscalar
float_types
=
fscalar
,
dscalar
complex_types
=
cscalar
,
zscalar
int_scalar_types
=
int_types
float_scalar_types
=
float_types
complex_scalar_types
=
complex_types
cvector
=
Tensor
(
'complex64'
,
(
False
,
))
zvector
=
Tensor
(
'complex128'
,
(
False
,
))
fvector
=
Tensor
(
'float32'
,
(
False
,
))
dvector
=
Tensor
(
'float64'
,
(
False
,
))
bvector
=
Tensor
(
'int8'
,
(
False
,))
...
...
@@ -436,7 +442,10 @@ vectors, fvectors, dvectors, ivectors, lvectors = _multi(vector, fvector, dvecto
int_vector_types
=
bvector
,
wvector
,
ivector
,
lvector
float_vector_types
=
fvector
,
dvector
complex_vector_types
=
cvector
,
zvector
cmatrix
=
Tensor
(
'complex64'
,
(
False
,
False
))
zmatrix
=
Tensor
(
'complex128'
,
(
False
,
False
))
fmatrix
=
Tensor
(
'float32'
,
(
False
,
False
))
dmatrix
=
Tensor
(
'float64'
,
(
False
,
False
))
bmatrix
=
Tensor
(
'int8'
,
(
False
,
False
))
...
...
@@ -450,7 +459,10 @@ matrices, fmatrices, dmatrices, imatrices, lmatrices = _multi(matrix, fmatrix, d
int_matrix_types
=
bmatrix
,
wmatrix
,
imatrix
,
lmatrix
float_matrix_types
=
fmatrix
,
dmatrix
complex_matrix_types
=
cmatrix
,
zmatrix
crow
=
Tensor
(
'complex64'
,
(
True
,
False
))
zrow
=
Tensor
(
'complex128'
,
(
True
,
False
))
frow
=
Tensor
(
'float32'
,
(
True
,
False
))
drow
=
Tensor
(
'float64'
,
(
True
,
False
))
brow
=
Tensor
(
'int8'
,
(
True
,
False
))
...
...
@@ -462,6 +474,8 @@ def row(name = None, dtype = 'float64'):
return
type
(
name
)
rows
,
frows
,
drows
,
irows
,
lrows
=
_multi
(
row
,
frow
,
drow
,
irow
,
lrow
)
ccol
=
Tensor
(
'complex64'
,
(
False
,
True
))
zcol
=
Tensor
(
'complex128'
,
(
False
,
True
))
fcol
=
Tensor
(
'float32'
,
(
False
,
True
))
dcol
=
Tensor
(
'float64'
,
(
False
,
True
))
bcol
=
Tensor
(
'int8'
,
(
False
,
True
))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论