Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
7377c59b
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7377c59b
编写于
5月 18, 2017
作者:
C
Cao Ying
提交者:
GitHub
5月 18, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2200 from luotao1/agg_level
add doc for AggregateLevel and ExpandLevel.
上级
debd4e4d
c7fb78b0
变更
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
浏览文件 @
7377c59b
...
...
@@ -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
浏览文件 @
7377c59b
...
...
@@ -225,6 +225,24 @@ class LayerType(object):
class
AggregateLevel
(
object
):
"""
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 the sample is a nested sequence,
each timestep of which is also a sequence.
Accordingly, AggregateLevel supports two modes:
- :code:`AggregateLevel.EACH_TIMESTEP` means the aggregation acts on each
timestep of a 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
浏览文件 @
7377c59b
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录