Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
596f9bca
提交
596f9bca
authored
1月 21, 2010
作者:
James Bergstra
浏览文件
操作
浏览文件
下载
差异文件
merge
上级
0581942d
ffee86c7
全部展开
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
55 行增加
和
4 行删除
+55
-4
generate_dtype_tensor_table.py
doc/generate_dtype_tensor_table.py
+32
-0
basic.txt
doc/library/tensor/basic.txt
+0
-0
index.txt
doc/library/tensor/index.txt
+2
-2
adding.txt
doc/tutorial/adding.txt
+1
-1
symbolic_graphs.txt
doc/tutorial/symbolic_graphs.txt
+10
-1
basic.py
theano/tensor/basic.py
+10
-0
没有找到文件。
doc/generate_dtype_tensor_table.py
0 → 100644
浏览文件 @
596f9bca
letters
=
[
(
'b'
,
'int8'
),
(
'w'
,
'int16'
),
(
'i'
,
'int32'
),
(
'l'
,
'int64'
),
(
'd'
,
'float64'
),
(
'f'
,
'float32'
),
(
'c'
,
'complex64'
),
(
'z'
,
'complex128'
)
]
shapes
=
[
(
'scalar'
,
()),
(
'vector'
,
(
False
,)),
(
'row'
,
(
True
,
False
)),
(
'col'
,
(
False
,
True
)),
(
'matrix'
,
(
False
,
False
)),
(
'tensor3'
,
(
False
,
False
,
False
)),
(
'tensor4'
,
(
False
,
False
,
False
,
False
)),]
hdr
=
'============ =========== ==== =========== ================================='
print
hdr
print
'Constructor dtype ndim shape broadcastable'
print
hdr
for
letter
in
letters
:
for
shape
in
shapes
:
suff
=
',)'
if
len
(
shape
[
1
])
==
1
else
')'
s
=
'('
+
','
.
join
(
'1'
if
b
else
'?'
for
b
in
shape
[
1
])
+
suff
print
'
%
s
%-10
s
%-10
s
%-4
s
%-10
s
%-20
s'
%
(
letter
[
0
],
shape
[
0
],
letter
[
1
],
len
(
shape
[
1
]),
s
,
shape
[
1
]
)
print
hdr
doc/library/tensor/basic.txt
浏览文件 @
596f9bca
差异被折叠。
点击展开。
doc/library/tensor/index.txt
浏览文件 @
596f9bca
...
...
@@ -10,8 +10,8 @@
.. moduleauthor:: LISA
Theano's strength is in expressing symbolic calculations involving tensors.
There are many types of symbolic expressions for tensors.
For everyone's
sanity, t
hey are grouped into the following sections:
There are many types of symbolic expressions for tensors.
T
hey are grouped into the following sections:
.. toctree::
...
...
doc/tutorial/adding.txt
浏览文件 @
596f9bca
...
...
@@ -65,7 +65,7 @@ is the type we assign to "0-dimensional arrays (`scalar`) of doubles
``dscalar`` is not a class. Therefore, neither ``x`` nor ``y``
are actually instances of ``dscalar``. They are instances of
:
ref:`TensorVariable <libdoc_tensor_type>
`. ``x`` and ``y``
:
class:`TensorVariable
`. ``x`` and ``y``
are, however, assigned the theano Type ``dscalar`` in their ``type``
field, as you can see here:
...
...
doc/tutorial/symbolic_graphs.txt
浏览文件 @
596f9bca
...
...
@@ -38,11 +38,20 @@ details about these building blocks see :ref:`variable`, :ref:`op`,
**Diagram**
.. _tutorial-graphfigure:
.. figure:: apply.png
:align: center
Interaction between instances of Apply (blue), Variable (red), Op (green),
and Type (purple).
.. # COMMENT
WARNING: hyper-links and ref's seem to break the PDF build when placed
into this figure caption.
Arrows represent references to the Python objects pointed at. The blue
Arrows in this :ref:`figure <tutorial-graphfigure>` represent references to the
Python objects pointed at. The blue
box is an :ref:`apply` node. Red boxes are :ref:`variable` nodes. Green
circles are :ref:`Ops <op>`. Purple boxes are :ref:`Types <type>`.
...
...
theano/tensor/basic.py
浏览文件 @
596f9bca
...
...
@@ -737,6 +737,11 @@ btensor3 = TensorType('int8', (False,)*3)
wtensor3
=
TensorType
(
'int16'
,
(
False
,)
*
3
)
itensor3
=
TensorType
(
'int32'
,
(
False
,)
*
3
)
ltensor3
=
TensorType
(
'int64'
,
(
False
,)
*
3
)
def
tensor3
(
name
=
None
,
dtype
=
'float64'
):
type
=
TensorType
(
dtype
,
(
False
,
False
,
False
))
return
type
(
name
)
tensor3s
,
ftensor3s
,
dtensor3s
,
itensor3s
,
ltensor3s
=
_multi
(
tensor3
,
ftensor3
,
dtensor3
,
itensor3
,
ltensor3
)
ctensor4
=
TensorType
(
'complex64'
,
(
False
,)
*
4
)
ztensor4
=
TensorType
(
'complex128'
,
(
False
,)
*
4
)
...
...
@@ -746,6 +751,11 @@ btensor4 = TensorType('int8', (False,)*4)
wtensor4
=
TensorType
(
'int16'
,
(
False
,)
*
4
)
itensor4
=
TensorType
(
'int32'
,
(
False
,)
*
4
)
ltensor4
=
TensorType
(
'int64'
,
(
False
,)
*
4
)
def
tensor4
(
name
=
None
,
dtype
=
'float64'
):
type
=
TensorType
(
dtype
,
(
False
,
False
,
False
,
False
))
return
type
(
name
)
tensor4s
,
ftensor4s
,
dtensor4s
,
itensor4s
,
ltensor4s
=
_multi
(
tensor4
,
ftensor4
,
dtensor4
,
itensor4
,
ltensor4
)
class
_tensor_py_operators
:
#UNARY
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论