Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
e1358945
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e1358945
编写于
11月 30, 2017
作者:
G
guosheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refine AvgPooling with excludeMode to make it compatible with the raw prototxt
上级
6b18b3cc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
7 deletion
+8
-7
proto/ModelConfig.proto
proto/ModelConfig.proto
+1
-1
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+3
-3
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+4
-3
未找到文件。
proto/ModelConfig.proto
浏览文件 @
e1358945
...
...
@@ -140,7 +140,7 @@ message PoolConfig {
optional
uint32
img_size_z
=
17
[
default
=
1
];
optional
uint32
padding_z
=
18
[
default
=
1
];
optional
bool
exclude_mode
=
19
[
default
=
true
]
;
optional
bool
exclude_mode
=
19
;
}
message
SppConfig
{
...
...
python/paddle/trainer/config_parser.py
浏览文件 @
e1358945
...
...
@@ -1262,8 +1262,8 @@ def parse_pool(pool, input_layer_name, pool_conf, ceil_mode, exclude_mode):
pool_conf
.
output_y
=
cnn_output_size
(
pool_conf
.
img_size_y
,
pool_conf
.
size_y
,
pool_conf
.
padding_y
,
pool_conf
.
stride_y
,
not
ceil_mode
)
pool_conf
.
exclude_mode
=
exclude_mode
if
exclude_mode
!=
None
:
pool_conf
.
exclude_mode
=
exclude_mode
def
parse_pool3d
(
pool
,
input_layer_name
,
pool_conf
,
ceil_mode
):
...
...
@@ -2305,7 +2305,7 @@ class NormLayer(LayerBase):
class
PoolLayer
(
LayerBase
):
layer_type
=
'pool'
def
__init__
(
self
,
name
,
inputs
,
ceil_mode
=
True
,
exclude_mode
=
Tru
e
,
def
__init__
(
self
,
name
,
inputs
,
ceil_mode
=
True
,
exclude_mode
=
Non
e
,
**
xargs
):
use_mkldnn
=
int
(
g_command_config_args
.
get
(
"use_mkldnn"
,
0
))
if
self
.
layer_type
==
"mkldnn_pool"
:
...
...
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
e1358945
...
...
@@ -2710,7 +2710,7 @@ def img_pool_layer(input,
stride_y
=
None
,
padding_y
=
None
,
ceil_mode
=
True
,
exclude_mode
=
Tru
e
):
exclude_mode
=
Non
e
):
"""
Image pooling Layer.
...
...
@@ -2779,8 +2779,9 @@ def img_pool_layer(input,
be used.
:type ceil_mode: bool
:param exclude_mode: Whether to exclude the padding cells when calculating, but only
work when pool_type is AvgPooling. If use cudnn, use CudnnAvgPooling
or CudnnAvgInclPadPooling as pool_type to identify.
work when pool_type is AvgPooling. If None, also exclude the padding
cells. If use cudnn, use CudnnAvgPooling or CudnnAvgInclPadPooling
as pool_type to identify the mode.
:type exclude_mode: bool
:return: LayerOutput object.
:rtype: LayerOutput
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录