Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
1561cf0f
提交
1561cf0f
authored
8月 05, 2016
作者:
sentient07
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added documentation at few places
上级
157ac1e2
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
23 行增加
和
5 行删除
+23
-5
opt.py
theano/gof/opt.py
+23
-5
没有找到文件。
theano/gof/opt.py
浏览文件 @
1561cf0f
...
@@ -201,7 +201,12 @@ class SeqOptimizer(Optimizer, list):
...
@@ -201,7 +201,12 @@ class SeqOptimizer(Optimizer, list):
def
__init__
(
self
,
*
opts
,
**
kw
):
def
__init__
(
self
,
*
opts
,
**
kw
):
"""
"""
WRITEME
Parameters
----------
opts : List
The List of optimizers to be applied to a node
kw : Dict
Dictonary containing failure call back message
"""
"""
if
len
(
opts
)
==
1
and
isinstance
(
opts
[
0
],
(
list
,
tuple
)):
if
len
(
opts
)
==
1
and
isinstance
(
opts
[
0
],
(
list
,
tuple
)):
...
@@ -1233,8 +1238,16 @@ def local_optimizer(tracks, inplace=False, requirements=()):
...
@@ -1233,8 +1238,16 @@ def local_optimizer(tracks, inplace=False, requirements=()):
class
LocalOptGroup
(
LocalOptimizer
):
class
LocalOptGroup
(
LocalOptimizer
):
"""
"""
WRITEME
Takes a list of LocalOptimizer and applies them to the nodes.
When apply_all_opts is set to True, it tries multiple optimization to a node.
A node is first optimized and the list of optimizers for the optimized node is applied
Parameters
----------
optimizers : List
List of optimizers to be applied to a node
kwargs : Dict
Dictionary containing apply_all_opts parameter. When True, multiple optimizers are applied.
"""
"""
def
__init__
(
self
,
*
optimizers
,
**
kwargs
):
def
__init__
(
self
,
*
optimizers
,
**
kwargs
):
...
@@ -1920,7 +1933,8 @@ class NavigatorOptimizer(Optimizer):
...
@@ -1920,7 +1933,8 @@ class NavigatorOptimizer(Optimizer):
class
TopoOptimizer
(
NavigatorOptimizer
):
class
TopoOptimizer
(
NavigatorOptimizer
):
"""
"""
WRITEME
TopoOptimizer has one local optimizer. It tries to apply to each node, in topological order (or reverse).
Each time the local optimizer applies, the node gets replaced, and the topooptimizer moves on to the next one.
"""
"""
...
@@ -1998,7 +2012,9 @@ class TopoOptimizer(NavigatorOptimizer):
...
@@ -1998,7 +2012,9 @@ class TopoOptimizer(NavigatorOptimizer):
def
out2in
(
*
local_opts
,
**
kwargs
):
def
out2in
(
*
local_opts
,
**
kwargs
):
"""WRITEME """
"""
Uses the TopoOptimizer from the output nodes to input nodes of the graph.
"""
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
,
None
))
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
,
None
))
if
len
(
local_opts
)
>
1
:
if
len
(
local_opts
)
>
1
:
# Don't wrap it uselessly if their is only 1 optimization.
# Don't wrap it uselessly if their is only 1 optimization.
...
@@ -2017,7 +2033,9 @@ def out2in(*local_opts, **kwargs):
...
@@ -2017,7 +2033,9 @@ def out2in(*local_opts, **kwargs):
def
in2out
(
*
local_opts
,
**
kwargs
):
def
in2out
(
*
local_opts
,
**
kwargs
):
"""WRITEME """
"""
Uses the TopoOptimizer from the input nodes to output nodes of the graph.
"""
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
,
None
))
name
=
(
kwargs
and
kwargs
.
pop
(
'name'
,
None
))
if
len
(
local_opts
)
>
1
:
if
len
(
local_opts
)
>
1
:
# Don't wrap it uselessly if their is only 1 optimization.
# Don't wrap it uselessly if their is only 1 optimization.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论