Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2f356ec8
提交
2f356ec8
authored
2月 17, 2009
作者:
Joseph Turian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Split concepts and extending up
上级
e1dfdef0
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
41 行增加
和
34 行删除
+41
-34
concepts.txt
doc/doc/concepts.txt
+35
-0
extending.txt
doc/doc/extending.txt
+3
-33
index.txt
doc/doc/index.txt
+3
-1
没有找到文件。
doc/doc/concepts.txt
0 → 100644
浏览文件 @
2f356ec8
.. _concepts:
================
Concepts
================
This page introduces some important terminology for describing how theano
works.
Lets start by looking at what happens in a simple theano program.
.. code-block:: python
x = tensor.matrix('x')
y = tensor.matrix('y')
z = x + y
f = theano.function(input=[x,y], output=z, mode='FAST_RUN')
print f(numpy.ones(2,3), numpy.ones(2,3))
The first three lines build a :term:`graph` whose nodes correspond to variables (``x,y,z``) and expressions (just the '+' here).
The variables in such a graph are :term:`Result` instances of some
:term:`Type`, and the expressions are :term:`Apply` instances of some
:term:`Op`.
The line ``f = theano.function([x,y], [z], mode='FAST_RUN')`` :term:`compiles
<Compilation>`.
the graph we built and returns a :term:`function` whose ``__call__`` method
takes as arguments the values to use for ``x`` and ``y``.
The :term:`mode` controls which :term:`transformations <Graph Transformation>` are applied to the graph as we compile it.
The line ``print f(numpy.ones(2,3), numpy.ones(2,3))`` creates two
matrices, and then uses f's ``__call__`` method to run the compiled
function on those inputs.
The compiled function is executed by a :term:`linker`, which was also specified by the :term:`mode` argument to ``function``.
The instance f's ``__call__`` method returns a value for ``z`` (given ``x,y``) which we print.
doc/doc/extending.txt
浏览文件 @
2f356ec8
.. _extending:
================
================
Extending theano
Extending theano
================
================
This page introduces some important terminology for describing how theano
When you're comfortable with the material in :ref:`concepts`, move on to:
works. Below there is a list of HOWTO documents for extending theano.
Lets start by looking at what happens in a simple theano program.
.. code-block:: python
x = tensor.matrix('x')
y = tensor.matrix('y')
z = x + y
f = theano.function(input=[x,y], output=z, mode='FAST_RUN')
print f(numpy.ones(2,3), numpy.ones(2,3))
The first three lines build a :term:`graph` whose nodes correspond to variables (``x,y,z``) and expressions (just the '+' here).
The variables in such a graph are :term:`Result` instances of some
:term:`Type`, and the expressions are :term:`Apply` instances of some
:term:`Op`.
The line ``f = theano.function([x,y], [z], mode='FAST_RUN')`` :term:`compiles
<Compilation>`.
the graph we built and returns a :term:`function` whose ``__call__`` method
takes as arguments the values to use for ``x`` and ``y``.
The :term:`mode` controls which :term:`transformations <Graph Transformation>` are applied to the graph as we compile it.
The line ``print f(numpy.ones(2,3), numpy.ones(2,3))`` creates two
matrices, and then uses f's ``__call__`` method to run the compiled
function on those inputs.
The compiled function is executed by a :term:`linker`, which was also specified by the :term:`mode` argument to ``function``.
The instance f's ``__call__`` method returns a value for ``z`` (given ``x,y``) which we print.
Theano was designed to be extensible to new :term:`types <Type>` of Result,
new :term:`Ops <Op>` to use in symbolic computations,
and new modes of compilation and execution. When you're comfortable with the material above, move on to:
* HowtoCreateType create a new data type,
* HowtoCreateType create a new data type,
* HowtoCreateOp create a new type of Op,
* HowtoCreateOp create a new type of Op,
...
...
doc/doc/index.txt
浏览文件 @
2f356ec8
...
@@ -13,7 +13,9 @@ developer documentation.
...
@@ -13,7 +13,9 @@ developer documentation.
- `Using Theano` covers how to *use* what is already in the Theano library to
- `Using Theano` covers how to *use* what is already in the Theano library to
build graphs and evaluate them.
build graphs and evaluate them.
- `Extending Theano` introduces how Theano works and explains how to add new
- `Concepts` introduces how Theano works.
- `Extending Theano` explains how to add new
data and expression types, as well as optimizations to accompany them.
data and expression types, as well as optimizations to accompany them.
- `Module`
- `Module`
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论