Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
46b27fd4
提交
46b27fd4
authored
10月 23, 2014
作者:
Pierre Luc Carrier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Document TensorTypes and their equivalent C types
上级
2173ff1a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
43 行增加
和
0 行删除
+43
-0
other_ops.txt
doc/extending/other_ops.txt
+36
-0
extending_theano_c.txt
doc/tutorial/extending_theano_c.txt
+7
-0
没有找到文件。
doc/extending/other_ops.txt
浏览文件 @
46b27fd4
...
...
@@ -242,3 +242,39 @@ Numba Ops
Want C speed without writing C code for your new Op? You can use Numba
to generate the C code for you! Here is an `example
Op <https://gist.github.com/nouiz/5492778#file-theano_op-py>`_ doing that.
Alternate Theano Types
======================
Most ops in Theano are used to manipulate tensors. However, Theano also
supports many other variable types. These are listed below, along with
pointers to the relevant documentation.
* TypedList : Theano type that represents a typed list (a list where
every element in the list has the same Theano type). Variables of this
Theano type are represented in C as objects of class
`PyListObject <https://docs.python.org/2/c-api/list.html>`_. The
documentation for TypedList can be found
:ref:`here <libdoc_typed_list>`.
* Generic : Theano type that represents a simple Python Object.
Variables of this Theano type are represented in C as objects of class
`PyObject
<https://docs.python.org/2/c-api/structures.html#c.PyObject>`_. The
documentation for TypedList can be found
:class:`here <theano.gof.type.Generic>`.
* Scalar : Theano type that represents a C primitive type. The C type
associated with this Theano type is the represented C primitive
itself. The documentation for the Scalar type can be
found :ref:`here <libdoc_scalar>`.
* CDataType : Theano type that represents a C data type. The C type
associated with this Theano type depends on the data being
represented.The documentation for CDataType can be found
:class:`here <theano.gof.type.CDataType>`.
* SparseType : Theano type used to represent sparse tensors. There is no
equivalent C type for this Theano Type but Theano provides functions
to extract the data from SparseType variables. The documentation for
Ops that rely on SparseType can be found :ref:`here <sparse_ops>`.
doc/tutorial/extending_theano_c.txt
浏览文件 @
46b27fd4
...
...
@@ -953,3 +953,10 @@ apply-specific because it uses the macros defined by ``COp``. Finally, the
function ``vector_times_vector()`` is apply-specific because it uses those
same macros and also because it calls ``vector_elemwise_mult()`` which is an
apply-specific function.
Final Note
==========
This tutorial focuses on providing C implementations to ops that manipulate
Theano tensors. For more information about other Theano types, you can refer
to the section :ref:`Other ops <other_ops>`.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论