Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
72066bc3
提交
72066bc3
authored
11月 08, 2013
作者:
Frédéric Bastien
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1592 from yosinski/master
Some doc / tutorial updates
上级
dd0b9e5d
70c3b000
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
6 行删除
+7
-6
scan.txt
doc/library/scan.txt
+2
-2
adding.txt
doc/tutorial/adding.txt
+1
-0
modes.txt
doc/tutorial/modes.txt
+4
-4
没有找到文件。
doc/library/scan.txt
浏览文件 @
72066bc3
...
@@ -27,7 +27,7 @@ More precisely, if *A* is a tensor you want to compute
...
@@ -27,7 +27,7 @@ More precisely, if *A* is a tensor you want to compute
for i in xrange(k):
for i in xrange(k):
result = result * A
result = result * A
There are three thing here that we need to handle: the initial value
There are three thing
s
here that we need to handle: the initial value
assigned to ``result``, the accumulation of results in ``result``, and
assigned to ``result``, the accumulation of results in ``result``, and
the unchanging variable ``A``. Unchanging variables are passed to scan as
the unchanging variable ``A``. Unchanging variables are passed to scan as
``non_sequences``. Initialization occurs in ``outputs_info``, and the accumulation
``non_sequences``. Initialization occurs in ``outputs_info``, and the accumulation
...
@@ -67,7 +67,7 @@ Next we initialize the output as a tensor with same shape and dtype as ``A``,
...
@@ -67,7 +67,7 @@ Next we initialize the output as a tensor with same shape and dtype as ``A``,
filled with ones. We give ``A`` to scan as a non sequence parameter and
filled with ones. We give ``A`` to scan as a non sequence parameter and
specify the number of steps ``k`` to iterate over our lambda expression.
specify the number of steps ``k`` to iterate over our lambda expression.
Scan return
a tuples,
containing our result (``result``) and a
Scan return
s a tuple
containing our result (``result``) and a
dictionary of updates (empty in this case). Note that the result
dictionary of updates (empty in this case). Note that the result
is not a matrix, but a 3D tensor containing the value of ``A**k`` for
is not a matrix, but a 3D tensor containing the value of ``A**k`` for
each step. We want the last value (after ``k`` steps) so we compile
each step. We want the last value (after ``k`` steps) so we compile
...
...
doc/tutorial/adding.txt
浏览文件 @
72066bc3
...
@@ -99,6 +99,7 @@ The second step is to combine *x* and *y* into their sum *z*:
...
@@ -99,6 +99,7 @@ The second step is to combine *x* and *y* into their sum *z*:
*x* and *y*. You can use the :ref:`pp <libdoc_printing>`
*x* and *y*. You can use the :ref:`pp <libdoc_printing>`
function to pretty-print out the computation associated to *z*.
function to pretty-print out the computation associated to *z*.
>>> from theano import pp
>>> print pp(z)
>>> print pp(z)
(x + y)
(x + y)
...
...
doc/tutorial/modes.txt
浏览文件 @
72066bc3
...
@@ -125,7 +125,7 @@ as it will be useful later on.
...
@@ -125,7 +125,7 @@ as it will be useful later on.
Mode
Mode
====
====
Everytime :func:`theano.function <function.function>` is called,
Every
time :func:`theano.function <function.function>` is called,
the symbolic relationships between the input and output Theano *variables*
the symbolic relationships between the input and output Theano *variables*
are optimized and compiled. The way this compilation occurs
are optimized and compiled. The way this compilation occurs
is controlled by the value of the ``mode`` parameter.
is controlled by the value of the ``mode`` parameter.
...
@@ -133,11 +133,11 @@ is controlled by the value of the ``mode`` parameter.
...
@@ -133,11 +133,11 @@ is controlled by the value of the ``mode`` parameter.
Theano defines the following modes by name:
Theano defines the following modes by name:
- ``'FAST_COMPILE'``: Apply just a few graph optimizations and only use Python implementations.
- ``'FAST_COMPILE'``: Apply just a few graph optimizations and only use Python implementations.
- ``'FAST_RUN'``: Apply all optimizations
,
and use C implementations where possible.
- ``'FAST_RUN'``: Apply all optimizations and use C implementations where possible.
- ``'DebugMode``: Verify the correctness of all optimizations, and compare C and Python
- ``'DebugMode``: Verify the correctness of all optimizations, and compare C and Python
implementations. This mode can take much longer than the other modes, but can identify
implementations. This mode can take much longer than the other modes, but can identify
several kinds of problems.
several kinds of problems.
- ``'ProfileMode'``: Same optimization
then FAST_RUN, p
ut print some profiling information
- ``'ProfileMode'``: Same optimization
as FAST_RUN, b
ut print some profiling information
The default mode is typically ``FAST_RUN``, but it can be controlled via
The default mode is typically ``FAST_RUN``, but it can be controlled via
the configuration variable :attr:`config.mode`,
the configuration variable :attr:`config.mode`,
...
@@ -167,7 +167,7 @@ A mode is composed of 2 things: an optimizer and a linker. Some modes,
...
@@ -167,7 +167,7 @@ A mode is composed of 2 things: an optimizer and a linker. Some modes,
like ``ProfileMode`` and ``DebugMode``, add logic around the optimizer and
like ``ProfileMode`` and ``DebugMode``, add logic around the optimizer and
linker. ``ProfileMode`` and ``DebugMode`` use their own linker.
linker. ``ProfileMode`` and ``DebugMode`` use their own linker.
You can select w
it
ch linker to use with the Theano flag :attr:`config.linker`.
You can select w
hi
ch linker to use with the Theano flag :attr:`config.linker`.
Here is a table to compare the different linkers.
Here is a table to compare the different linkers.
============= ========= ================= ========= ===
============= ========= ================= ========= ===
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论