Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
470d6717
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
694
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
470d6717
编写于
2月 26, 2018
作者:
C
chengduoZH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow comment
上级
46bc0fec
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
8 addition
and
3 deletion
+8
-3
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+7
-2
python/paddle/fluid/layers/utils.py
python/paddle/fluid/layers/utils.py
+1
-1
未找到文件。
python/paddle/fluid/layers/nn.py
浏览文件 @
470d6717
...
@@ -1431,8 +1431,8 @@ def sequence_last_step(input):
...
@@ -1431,8 +1431,8 @@ def sequence_last_step(input):
def
pool2d
(
input
,
def
pool2d
(
input
,
pool_size
,
pool_size
=-
1
,
pool_type
,
pool_type
=
"max"
,
pool_stride
=
1
,
pool_stride
=
1
,
pool_padding
=
0
,
pool_padding
=
0
,
global_pooling
=
False
,
global_pooling
=
False
,
...
@@ -1447,6 +1447,11 @@ def pool2d(input,
...
@@ -1447,6 +1447,11 @@ def pool2d(input,
"Unknown pool_type: '%s'. It can only be 'max' or 'avg'."
,
"Unknown pool_type: '%s'. It can only be 'max' or 'avg'."
,
str
(
pool_type
))
str
(
pool_type
))
if
global_pooling
is
False
and
pool_size
==
-
1
:
raise
ValueError
(
"When the global_pooling is False, pool_size must be passed "
"and be a valid value. Received pool_size: "
+
str
(
pool_size
))
pool_size
=
utils
.
convert_to_list
(
pool_size
,
2
,
'pool_size'
)
pool_size
=
utils
.
convert_to_list
(
pool_size
,
2
,
'pool_size'
)
pool_padding
=
utils
.
convert_to_list
(
pool_padding
,
2
,
'pool_padding'
)
pool_padding
=
utils
.
convert_to_list
(
pool_padding
,
2
,
'pool_padding'
)
pool_stride
=
utils
.
convert_to_list
(
pool_stride
,
2
,
'pool_stride'
)
pool_stride
=
utils
.
convert_to_list
(
pool_stride
,
2
,
'pool_stride'
)
...
...
python/paddle/
v2/
fluid/layers/utils.py
→
python/paddle/fluid/layers/utils.py
浏览文件 @
470d6717
...
@@ -47,7 +47,7 @@ def convert_to_list(value, n, name):
...
@@ -47,7 +47,7 @@ def convert_to_list(value, n, name):
int
(
single_value
)
int
(
single_value
)
except
(
ValueError
,
TypeError
):
except
(
ValueError
,
TypeError
):
raise
ValueError
(
raise
ValueError
(
"The "
+
name
+
"'s must be a list or tuple of "
+
str
(
"The "
+
name
+
"'s
type
must be a list or tuple of "
+
str
(
n
)
+
" integers. Received: "
+
str
(
value
)
+
" "
n
)
+
" integers. Received: "
+
str
(
value
)
+
" "
"including element "
+
str
(
single_value
)
+
" of type"
+
" "
"including element "
+
str
(
single_value
)
+
" of type"
+
" "
+
str
(
type
(
single_value
)))
+
str
(
type
(
single_value
)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录