Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
bd24526f
提交
bd24526f
authored
1月 14, 2014
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Typo fixes in doc
上级
835c39f4
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
12 行删除
+12
-12
opfromgraph.txt
doc/library/compile/opfromgraph.txt
+8
-8
builders.py
theano/compile/builders.py
+4
-4
没有找到文件。
doc/library/compile/opfromgraph.txt
浏览文件 @
bd24526f
...
@@ -4,23 +4,23 @@
...
@@ -4,23 +4,23 @@
OpFromGraph
OpFromGraph
===========
===========
This page descri
pbe
:class:`theano.OpFromGraph
This page descri
bes
:class:`theano.OpFromGraph
<theano.compile.builders.OpFromGraph>`
. an Op that allow
to
<theano.compile.builders.OpFromGraph>`
, an Op that allows
to
encapsulate a Theano graph in an op.
encapsulate a Theano graph in an op.
This can be used to encapsulate some functionality in one block. It is
This can be used to encapsulate some functionality in one block. It is
useful to scale Theano compilation for regular bigger graph when we
useful to scale Theano compilation for regular bigger graph
s
when we
reuse that encapsulated fonctionality with different inputs many
reuse that encapsulated fonctionality with different inputs many
times. Due to this encapsulation, it can make Theano compilation phase
times. Due to this encapsulation, it can make Theano compilation phase
faster for graph with many nodes.
faster for graph
s
with many nodes.
Using this for small graph
isn't recommanded as it disable
Using this for small graph
s is not recommended as it disables
optimization
between what is inside the encapsulation and outside
it.
optimization
s between what is inside the encapsulation and outside of
it.
.. note:
.. note:
This was
n'
t used widely up to now. If you have any
This was
no
t used widely up to now. If you have any
questions/comments do
n't
contact us on the mailing list.
questions/comments do
not hesitate to
contact us on the mailing list.
...
...
theano/compile/builders.py
浏览文件 @
bd24526f
...
@@ -6,10 +6,10 @@ from theano.gof import ops_with_inner_function
...
@@ -6,10 +6,10 @@ from theano.gof import ops_with_inner_function
class
OpFromGraph
(
gof
.
Op
):
class
OpFromGraph
(
gof
.
Op
):
"""This create
an `Op` from inputs and outputs list
of variables.
"""This create
s an `Op` from inputs and outputs lists
of variables.
The signature is similar to theano.function() and the resulting
The signature is similar to theano.function() and the resulting
`Op` perform will do the same operation as::
`Op`
's
perform will do the same operation as::
orig_function(inputs, outputs, **kwargs)
orig_function(inputs, outputs, **kwargs)
...
@@ -19,13 +19,13 @@ class OpFromGraph(gof.Op):
...
@@ -19,13 +19,13 @@ class OpFromGraph(gof.Op):
- c_code() to remove the double overhead?
- c_code() to remove the double overhead?
- opt to unfold it, work inplace on inputs
- opt to unfold it, work inplace on inputs
- grad() make it support DisconnectedType and the new interface
- grad() make it support DisconnectedType and the new interface
- check how it work with updates.
- check how it work
s
with updates.
- add test with constant as input or inside the inner graph.
- add test with constant as input or inside the inner graph.
- Add support for the GPU? Probably just need an opt to remove transfer
- Add support for the GPU? Probably just need an opt to remove transfer
- Add support to pickle this Op.
- Add support to pickle this Op.
- Add support/test with random generator
- Add support/test with random generator
:note:
:note:
- We support shared variable in the inner graph. This is automatic and
- We support shared variable
s
in the inner graph. This is automatic and
invisible to the user. They can be as input to the node or in the
invisible to the user. They can be as input to the node or in the
inner graph.
inner graph.
- We support unused inputs. This is needed for the grad.
- We support unused inputs. This is needed for the grad.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论