Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
f7302dfd
提交
f7302dfd
authored
5月 25, 2015
作者:
--global
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Document the types of optimizations that Theano cannot do.
上级
1045a27a
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
19 行增加
和
16 行删除
+19
-16
scan.txt
doc/library/scan.txt
+19
-16
没有找到文件。
doc/library/scan.txt
浏览文件 @
f7302dfd
...
@@ -507,24 +507,27 @@ Graph optimizations
...
@@ -507,24 +507,27 @@ Graph optimizations
^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^
This one is simple but still worth pointing out. Theano is able to
This one is simple but still worth pointing out. Theano is able to
automatically recognize and optimize many computation patterns. However, it
automatically recognize and optimize many computation patterns. However, there
doesn't catch every case that could be optimized and it remains useful for
are patterns that Theano doesn't optimize because doing so would change the
performance that the user defines an efficient graph in the first place. This
user interface (such as merging shared variables together into a single one,
is also the case, and sometimes even more so, for the graph inside of Scan.
for instance). Additionnaly, Theano doesn't catch every case that it could
This is because it will be executed many times for every execution of the
optimize and so it remains useful for performance that the user defines an
Theano function that contains it.
efficient graph in the first place. This is also the case, and sometimes even
more so, for the graph inside of Scan. This is because it will be executed
many times for every execution of the Theano function that contains it.
The `LSTM tutorial <http://deeplearning.net/tutorial/lstm.html>`_ on
The `LSTM tutorial <http://deeplearning.net/tutorial/lstm.html>`_ on
`DeepLearning.net <http://deeplearning.net>`_ provides an example of such
`DeepLearning.net <http://deeplearning.net>`_ provides an example of an
optimization. Instead of performing many matrix multiplications between matrix
optimization that Theano cannot perform. Instead of performing many matrix
:math:`x_t` and each of the matrices :math:`W_i`, :math:`W_c`, :math:`W_f` and
multiplications between matrix :math:`x_t` and each of the shared matrices
:math:`W_o`, the matrices :math:`W_*`, are concatenated into a single matrix
:math:`W_i`, :math:`W_c`, :math:`W_f` and :math:`W_o`, the matrices
:math:`W` and the graph performs a single larger matrix multiplication
:math:`W_*`, are merged into a single shared matrix :math:`W` and the graph
between :math:`W` and :math:`x_t`. The resulting matrix is then sliced to
performs a single larger matrix multiplication between :math:`W` and
obtain the results of that the small individual matrix multiplications
:math:`x_t`. The resulting matrix is then sliced to obtain the results of that
would have produced. This optimization replaces many small and inefficient
the small individual matrix multiplications would have produced. This
matrix multiplications but a single larger one and thus improves performance
optimization replaces many small and inefficient matrix multiplications but a
at the cost of a potentially higher memory usage.
single larger one and thus improves performance at the cost of a potentially
higher memory usage.
reference
reference
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论