Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
dd6f5919
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看板
未验证
提交
dd6f5919
编写于
1月 11, 2021
作者:
B
Bai Yifan
提交者:
GitHub
1月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test_pool3d_op timeout issue (#30248)
上级
ec2cac44
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
25 deletion
+27
-25
python/paddle/fluid/tests/unittests/test_pool3d_op.py
python/paddle/fluid/tests/unittests/test_pool3d_op.py
+27
-25
未找到文件。
python/paddle/fluid/tests/unittests/test_pool3d_op.py
浏览文件 @
dd6f5919
...
...
@@ -18,6 +18,7 @@ from __future__ import division
import
unittest
import
numpy
as
np
import
paddle
import
paddle.fluid.core
as
core
from
op_test
import
OpTest
import
paddle.fluid
as
fluid
...
...
@@ -235,6 +236,7 @@ class TestPool3D_Op(OpTest):
self
.
init_adaptive
()
self
.
init_data_format
()
self
.
init_shape
()
paddle
.
enable_static
()
input
=
np
.
random
.
random
(
self
.
shape
).
astype
(
self
.
dtype
)
output
=
pool3D_forward_naive
(
...
...
@@ -283,7 +285,7 @@ class TestPool3D_Op(OpTest):
self
.
data_format
=
"NCDHW"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
5
,
6
,
5
]
self
.
shape
=
[
1
,
3
,
5
,
6
,
5
]
def
init_test_case
(
self
):
self
.
ksize
=
[
2
,
3
,
1
]
...
...
@@ -314,7 +316,7 @@ class TestPool3D_Op(OpTest):
class
TestCase1
(
TestPool3D_Op
):
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
7
,
7
,
7
]
self
.
shape
=
[
1
,
3
,
7
,
7
,
7
]
def
init_test_case
(
self
):
self
.
ksize
=
[
3
,
3
,
3
]
...
...
@@ -332,7 +334,7 @@ class TestCase1(TestPool3D_Op):
class
TestCase2
(
TestPool3D_Op
):
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
6
,
7
,
7
]
self
.
shape
=
[
1
,
3
,
6
,
7
,
7
]
def
init_test_case
(
self
):
self
.
ksize
=
[
3
,
3
,
4
]
...
...
@@ -498,7 +500,7 @@ class TestAvgPoolAdaptiveAsyOutSize(TestCase1):
self
.
adaptive
=
True
def
init_shape
(
self
):
self
.
shape
=
[
8
,
3
,
2
,
4
,
4
]
self
.
shape
=
[
1
,
3
,
3
,
4
,
4
]
def
init_test_case
(
self
):
self
.
ksize
=
[
2
,
2
,
3
]
...
...
@@ -515,7 +517,7 @@ class TestPool3D_Op_AsyPadding(TestPool3D_Op):
self
.
paddings
=
[
0
,
0
,
0
,
2
,
3
,
0
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
5
,
5
,
6
]
self
.
shape
=
[
1
,
3
,
5
,
5
,
6
]
class
TestCase1_AsyPadding
(
TestCase1
):
...
...
@@ -527,7 +529,7 @@ class TestCase1_AsyPadding(TestCase1):
self
.
paddings
=
[
1
,
0
,
2
,
1
,
2
,
1
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
7
,
7
,
6
]
self
.
shape
=
[
1
,
3
,
7
,
7
,
6
]
class
TestCase2_AsyPadding
(
TestCase2
):
...
...
@@ -539,7 +541,7 @@ class TestCase2_AsyPadding(TestCase2):
self
.
paddings
=
[
1
,
2
,
1
,
1
,
1
,
0
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
7
,
7
,
7
]
self
.
shape
=
[
1
,
3
,
7
,
7
,
7
]
class
TestCase3_AsyPadding
(
TestCase3
):
...
...
@@ -551,7 +553,7 @@ class TestCase3_AsyPadding(TestCase3):
self
.
paddings
=
[
1
,
0
,
0
,
0
,
1
,
0
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
5
,
5
,
5
]
self
.
shape
=
[
1
,
3
,
5
,
5
,
5
]
class
TestCase4_AsyPadding
(
TestCase4
):
...
...
@@ -563,7 +565,7 @@ class TestCase4_AsyPadding(TestCase4):
self
.
paddings
=
[
1
,
0
,
2
,
1
,
2
,
1
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
7
,
7
,
7
]
self
.
shape
=
[
1
,
3
,
7
,
7
,
7
]
class
TestCase5_AsyPadding
(
TestCase5
):
...
...
@@ -575,7 +577,7 @@ class TestCase5_AsyPadding(TestCase5):
self
.
paddings
=
[
1
,
2
,
1
,
1
,
1
,
0
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
7
,
7
,
7
]
self
.
shape
=
[
1
,
3
,
7
,
7
,
7
]
create_test_cudnn_class
(
TestPool3D_Op_AsyPadding
)
...
...
@@ -620,7 +622,7 @@ class TestCUDNNAvgInclude_AsyPadding(TestCase2):
self
.
paddings
=
[
1
,
0
,
0
,
0
,
0
,
0
]
def
init_shape
(
self
):
self
.
shape
=
[
2
,
3
,
5
,
5
,
5
]
self
.
shape
=
[
1
,
3
,
5
,
5
,
5
]
class
TestAvgPoolAdaptive_AsyPadding
(
TestCase1
):
...
...
@@ -637,7 +639,7 @@ class TestPool3D_channel_last(TestPool3D_Op):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
5
,
5
,
6
,
3
]
self
.
shape
=
[
1
,
5
,
5
,
6
,
3
]
class
TestCase1_channel_last
(
TestCase1
):
...
...
@@ -645,7 +647,7 @@ class TestCase1_channel_last(TestCase1):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
7
,
7
,
3
]
self
.
shape
=
[
1
,
7
,
7
,
7
,
3
]
class
TestCase2_channel_last
(
TestCase2
):
...
...
@@ -653,7 +655,7 @@ class TestCase2_channel_last(TestCase2):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
7
,
5
,
3
]
self
.
shape
=
[
1
,
7
,
7
,
5
,
3
]
class
TestCase3_channel_last
(
TestCase3
):
...
...
@@ -661,7 +663,7 @@ class TestCase3_channel_last(TestCase3):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
5
,
6
,
5
,
3
]
self
.
shape
=
[
1
,
5
,
6
,
5
,
3
]
class
TestCase4_channel_last
(
TestCase4
):
...
...
@@ -669,7 +671,7 @@ class TestCase4_channel_last(TestCase4):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
6
,
7
,
3
]
self
.
shape
=
[
1
,
7
,
6
,
7
,
3
]
class
TestCase5_channel_last
(
TestCase5
):
...
...
@@ -677,7 +679,7 @@ class TestCase5_channel_last(TestCase5):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
7
,
7
,
3
]
self
.
shape
=
[
1
,
7
,
7
,
7
,
3
]
create_test_cudnn_class
(
TestPool3D_channel_last
)
...
...
@@ -714,7 +716,7 @@ class TestCase5_channel_last_Max(TestCase5_Max):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
7
,
7
,
3
]
self
.
shape
=
[
1
,
7
,
7
,
7
,
3
]
create_test_cudnn_class
(
TestCase5_Max
)
...
...
@@ -747,7 +749,7 @@ class TestPool3D_Op_AsyPadding_channel_last(TestPool3D_Op_AsyPadding):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
5
,
5
,
6
,
3
]
self
.
shape
=
[
1
,
5
,
5
,
6
,
3
]
class
TestCase1_AsyPadding_channel_last
(
TestCase1_AsyPadding
):
...
...
@@ -755,7 +757,7 @@ class TestCase1_AsyPadding_channel_last(TestCase1_AsyPadding):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
6
,
8
,
3
]
self
.
shape
=
[
1
,
7
,
6
,
8
,
3
]
class
TestCase2_AsyPadding_channel_last
(
TestCase2_AsyPadding
):
...
...
@@ -763,7 +765,7 @@ class TestCase2_AsyPadding_channel_last(TestCase2_AsyPadding):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
6
,
8
,
7
,
3
]
self
.
shape
=
[
1
,
6
,
8
,
7
,
3
]
class
TestCase3_AsyPadding_channel_last
(
TestCase3_AsyPadding
):
...
...
@@ -771,7 +773,7 @@ class TestCase3_AsyPadding_channel_last(TestCase3_AsyPadding):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
5
,
7
,
5
,
3
]
self
.
shape
=
[
1
,
5
,
7
,
5
,
3
]
class
TestCase4_AsyPadding_channel_last
(
TestCase4_AsyPadding
):
...
...
@@ -779,7 +781,7 @@ class TestCase4_AsyPadding_channel_last(TestCase4_AsyPadding):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
6
,
7
,
7
,
3
]
self
.
shape
=
[
1
,
6
,
7
,
7
,
3
]
class
TestCase5_AsyPadding_channel_last
(
TestCase5_AsyPadding
):
...
...
@@ -787,7 +789,7 @@ class TestCase5_AsyPadding_channel_last(TestCase5_AsyPadding):
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
8
,
6
,
3
]
self
.
shape
=
[
1
,
7
,
8
,
6
,
3
]
create_test_cudnn_class
(
TestPool3D_Op_AsyPadding_channel_last
)
...
...
@@ -823,7 +825,7 @@ class TestAvgPoolAdaptive_AsyPadding_channel_last(
self
.
data_format
=
"NDHWC"
def
init_shape
(
self
):
self
.
shape
=
[
2
,
7
,
7
,
7
,
3
]
self
.
shape
=
[
1
,
7
,
7
,
7
,
3
]
#test padding = SAME VALID
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录