Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
f8a42d5d
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f8a42d5d
编写于
5月 18, 2017
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add doc for AggregateLevel and ExpandLevel
上级
39b91123
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
2 deletion
+43
-2
doc/api/v2/config/layer.rst
doc/api/v2/config/layer.rst
+10
-0
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+31
-0
python/paddle/v2/layer.py
python/paddle/v2/layer.py
+2
-2
未找到文件。
doc/api/v2/config/layer.rst
浏览文件 @
f8a42d5d
...
...
@@ -207,6 +207,11 @@ trans_full_matrix_projection
Aggregate Layers
================
AggregateLevel
--------------
.. autoclass:: paddle.v2.layer.AggregateLevel
:noindex:
.. _api_v2.layer_pooling:
pooling
...
...
@@ -248,6 +253,11 @@ block_expand
.. _api_v2.layer_expand:
ExpandLevel
-----------
.. autoclass:: paddle.v2.layer.ExpandLevel
:noindex:
expand
------
.. autoclass:: paddle.v2.layer.expand
...
...
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
f8a42d5d
...
...
@@ -225,6 +225,24 @@ class LayerType(object):
class
AggregateLevel
(
object
):
"""
As PaddlePaddle supports three sequence types:
- :code:`SequenceType.NO_SEQUENCE` means the sample is not a sequence.
- :code:`SequenceType.SEQUENCE` means the sample is a sequence.
- :code:`SequenceType.SUB_SEQUENCE` means it is a nested sequence, that
each timestep of the input sequence is also a sequence.
Thus, AggregateLevel supports two modes:
- :code:`AggregateLevel.EACH_TIMESTEP` means the aggregation acts on each
timestep of sequence, both :code:`SUB_SEQUENCE` and :code:`SEQUENCE` will
be aggregated to :code:`NO_SEQUENCE`.
- :code:`AggregateLevel.EACH_SEQUENCE` means the aggregation acts on each
sequence of a nested sequence, :code:`SUB_SEQUENCE` will be aggregated to
:code:`SEQUENCE`.
"""
EACH_TIMESTEP
=
'non-seq'
EACH_SEQUENCE
=
'seq'
...
...
@@ -1454,6 +1472,19 @@ def first_seq(input,
class
ExpandLevel
(
object
):
"""
Please refer to AggregateLevel first.
ExpandLevel supports two modes:
- :code:`ExpandLevel.FROM_TIMESTEP` means the expandation acts on each
timestep of a sequence, :code:`NO_SEQUENCE` will be expanded to
:code:`SEQUENCE` or :code:`SUB_SEQUENCE`.
- :code:`ExpandLevel.FROM_SEQUENCE` means the expandation acts on each
sequence of a nested sequence, :code:`SEQUENCE` will be expanded to
:code:`SUB_SEQUENCE`.
"""
FROM_TIMESTEP
=
AggregateLevel
.
EACH_TIMESTEP
FROM_SEQUENCE
=
AggregateLevel
.
EACH_SEQUENCE
...
...
python/paddle/v2/layer.py
浏览文件 @
f8a42d5d
...
...
@@ -404,8 +404,8 @@ class RecurrentLayerOutput(Layer):
LayerV2
=
Layer
data
=
DataLayerV2
data
.
__name__
=
'data'
AggregateLevel
=
conf_helps
.
layers
.
AggregateLevel
ExpandLevel
=
conf_helps
.
layers
.
ExpandLevel
AggregateLevel
=
conf_helps
.
AggregateLevel
ExpandLevel
=
conf_helps
.
ExpandLevel
memory
=
MemoryV2
memory
.
__name__
=
'memory'
memory
.
__doc__
=
conf_helps
.
memory
.
__doc__
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录