Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
f75809eb
提交
f75809eb
authored
3月 16, 2009
作者:
Olivier Breuleux
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updated documentation to reflect Tensor -> NDArrayType
上级
3c5882e1
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
21 行增加
和
21 行删除
+21
-21
graphstructures.txt
doc/advanced/graphstructures.txt
+2
-2
type.txt
doc/tutorials/advanced/ex1/type.txt
+5
-5
tips.txt
doc/tutorials/advanced/tips.txt
+1
-1
adding.txt
doc/tutorials/basic/adding.txt
+4
-4
tools.txt
doc/tutorials/basic/tools.txt
+5
-5
tensorop.txt
doc/tutorials/tensorop.txt
+1
-1
tensoroptools.txt
doc/tutorials/tensoroptools.txt
+3
-3
没有找到文件。
doc/advanced/graphstructures.txt
浏览文件 @
f75809eb
...
@@ -86,8 +86,8 @@ This is what you would type to build the graph explicitly:
...
@@ -86,8 +86,8 @@ This is what you would type to build the graph explicitly:
from theano.tensor import *
from theano.tensor import *
# We instantiate a type that represents a matrix of doubles
# We instantiate a type that represents a matrix of doubles
float64_matrix =
Tensor
(dtype = 'float64', # double
float64_matrix =
NDArrayType
(dtype = 'float64', # double
broadcastable = (False, False)) # matrix
broadcastable = (False, False)) # matrix
# We make the Result instances we need.
# We make the Result instances we need.
x = Result(type = float64_matrix, name = 'x')
x = Result(type = float64_matrix, name = 'x')
...
...
doc/tutorials/advanced/ex1/type.txt
浏览文件 @
f75809eb
...
@@ -221,11 +221,11 @@ attempt to clear up the confusion:
...
@@ -221,11 +221,11 @@ attempt to clear up the confusion:
structural similarities. In the ``double`` example that we are
structural similarities. In the ``double`` example that we are
doing, there is actually only one Type in that set, therefore the
doing, there is actually only one Type in that set, therefore the
subclass doesn't represent anything that one of its instances
subclass doesn't represent anything that one of its instances
doesn't. In this case it is a singleton. However, the
Tensor class
doesn't. In this case it is a singleton. However, the
NDArrayType
which is a subclass of Type represents a set of types of tensors
class which is a subclass of Type represents a set of types of
parametrized by their data type or number of dimensions. We could
tensors parametrized by their data type or number of dimensions. We
say that subclassing Type builds a hierarchy of Types which is based
could say that subclassing Type builds a hierarchy of Types which is
upon structural similarity rather than compatibility.
based
upon structural similarity rather than compatibility.
Final version
Final version
...
...
doc/tutorials/advanced/tips.txt
浏览文件 @
f75809eb
...
@@ -40,7 +40,7 @@ Theano provides some generic Op classes which allow you to generate a
...
@@ -40,7 +40,7 @@ Theano provides some generic Op classes which allow you to generate a
lot of ops at a lesser effort. For instance, Elemwise can be used to
lot of ops at a lesser effort. For instance, Elemwise can be used to
make :term:`elementwise` operations easily whereas DimShuffle can be
make :term:`elementwise` operations easily whereas DimShuffle can be
used to make transpose-like transformations. These higher order Ops
used to make transpose-like transformations. These higher order Ops
are mostly
Tensor
-related, as this is Theano's specialty. An exposé of
are mostly
NDArray
-related, as this is Theano's specialty. An exposé of
them can therefore be found in :ref:`tensoroptools`.
them can therefore be found in :ref:`tensoroptools`.
...
...
doc/tutorials/basic/adding.txt
浏览文件 @
f75809eb
...
@@ -49,16 +49,16 @@ is the type we assign to "0-dimensional arrays (`scalar`) of doubles
...
@@ -49,16 +49,16 @@ is the type we assign to "0-dimensional arrays (`scalar`) of doubles
``dscalar`` is not a class. Therefore, neither ``x`` nor ``y``
``dscalar`` is not a class. Therefore, neither ``x`` nor ``y``
are actually instances of ``dscalar``. They are instances of
are actually instances of ``dscalar``. They are instances of
:api:`
TensorResult <theano.tensor.basic.Tensor
Result>`. ``x`` and ``y``
:api:`
NDArrayResult <theano.tensor.basic.NDArray
Result>`. ``x`` and ``y``
are, however, assigned the theano Type ``dscalar`` in their ``type``
are, however, assigned the theano Type ``dscalar`` in their ``type``
field, as you can see here:
field, as you can see here:
>>> type(x)
>>> type(x)
<class 'theano.tensor.basic.
Tensor
Result'>
<class 'theano.tensor.basic.
NDArray
Result'>
>>> x.type
>>> x.type
Tensor
(float64, scalar)
NDArrayType
(float64, scalar)
>>> T.dscalar
>>> T.dscalar
Tensor
(float64, scalar)
NDArrayType
(float64, scalar)
>>> x.type == T.dscalar
>>> x.type == T.dscalar
True
True
...
...
doc/tutorials/basic/tools.txt
浏览文件 @
f75809eb
...
@@ -84,7 +84,7 @@ Custom tensor types
...
@@ -84,7 +84,7 @@ Custom tensor types
If you wish to use a type of tensor which is not already available here
If you wish to use a type of tensor which is not already available here
(for example, a 3D tensor) you can build an appropriate type using
(for example, a 3D tensor) you can build an appropriate type using
``theano.tensor.
Tensor
``. The first argument you pass is the ``dtype``
``theano.tensor.
NDArrayType
``. The first argument you pass is the ``dtype``
and the second is the ``broadcastable pattern``.
and the second is the ``broadcastable pattern``.
Where ``dtype`` is one of:
Where ``dtype`` is one of:
...
@@ -110,7 +110,7 @@ complex128 complex 128 (two float64)
...
@@ -110,7 +110,7 @@ complex128 complex 128 (two float64)
Even though ``theano.tensor`` does not define any type
Even though ``theano.tensor`` does not define any type
using ``complex`` dtypes (``complex64`` or ``complex128``),
using ``complex`` dtypes (``complex64`` or ``complex128``),
you can define them explicitly with ``
Tensor
`` (see example
you can define them explicitly with ``
NDArrayType
`` (see example
below). However, few operations are fully supported for complex
below). However, few operations are fully supported for complex
types: as of version 0.1, only elementary operations (``+-*/``)
types: as of version 0.1, only elementary operations (``+-*/``)
have C implementations. Additionally, complex types have received
have C implementations. Additionally, complex types have received
...
@@ -154,11 +154,11 @@ bytes, we would do:
...
@@ -154,11 +154,11 @@ bytes, we would do:
.. code-block:: python
.. code-block:: python
# 3D tensor of signed bytes
# 3D tensor of signed bytes
mytype = theano.tensor.
Tensor
('uint8', [False]*3)
mytype = theano.tensor.
NDArrayType
('uint8', [False]*3)
# complex types (based on complex64)
# complex types (based on complex64)
my_cscalar = theano.tensor.
Tensor
('complex64', [])
my_cscalar = theano.tensor.
NDArrayType
('complex64', [])
my_cmatrix = theano.tensor.
Tensor
('complex64', [False, False])
my_cmatrix = theano.tensor.
NDArrayType
('complex64', [False, False])
Ops
Ops
...
...
doc/tutorials/tensorop.txt
浏览文件 @
f75809eb
...
@@ -6,7 +6,7 @@ How to make a new Op on tensors
...
@@ -6,7 +6,7 @@ How to make a new Op on tensors
===============================
===============================
This tutorial aims to explain how to create a new operation operating
This tutorial aims to explain how to create a new operation operating
on numpy's ndarrays and using Theano's
Tensor t
ype. It is optional but
on numpy's ndarrays and using Theano's
NDArrayT
ype. It is optional but
recommended to go through the :ref:`advtutorial` beforehand, which
recommended to go through the :ref:`advtutorial` beforehand, which
explains more in detail the purpose of each of the methods you will
explains more in detail the purpose of each of the methods you will
define here.
define here.
...
...
doc/tutorials/tensoroptools.txt
浏览文件 @
f75809eb
.. _tensoroptools:
.. _tensoroptools:
===============
===============
=
Tensor
Op Tools
NDArray
Op Tools
===============
===============
=
WRITEME - describe how to use Elemwise here
WRITEME - describe how to use Elemwise here
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论