Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
ed7aa8f9
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ed7aa8f9
编写于
11月 23, 2020
作者:
K
Kaipeng Deng
提交者:
GitHub
11月 23, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix conv transpose (#28629)
* fix conv_transpose unittest. test=develop
上级
bff4179c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
121 addition
and
117 deletion
+121
-117
python/paddle/fluid/tests/unittests/CMakeLists.txt
python/paddle/fluid/tests/unittests/CMakeLists.txt
+2
-3
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
.../paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
+2
-95
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op_depthwise_conv.py
...ests/unittests/test_conv2d_transpose_op_depthwise_conv.py
+96
-0
python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py
.../paddle/fluid/tests/unittests/test_conv3d_transpose_op.py
+21
-19
未找到文件。
python/paddle/fluid/tests/unittests/CMakeLists.txt
浏览文件 @
ed7aa8f9
...
...
@@ -75,8 +75,6 @@ if(NOT WITH_GPU OR WIN32)
LIST
(
REMOVE_ITEM TEST_OPS test_collective_allgather_api
)
endif
()
#TODO(sunxiaolong01): Fix this unitest failed on GCC8.
LIST
(
REMOVE_ITEM TEST_OPS test_conv2d_transpose_op
)
if
(
WIN32
)
LIST
(
REMOVE_ITEM TEST_OPS test_boxps
)
LIST
(
REMOVE_ITEM TEST_OPS test_trainer_desc
)
...
...
@@ -341,7 +339,6 @@ list(REMOVE_ITEM TEST_OPS test_fuse_bn_act_pass)
list
(
REMOVE_ITEM TEST_OPS test_fuse_bn_add_act_pass
)
list
(
REMOVE_ITEM TEST_OPS test_imperative_static_runner_mnist
)
list
(
REMOVE_ITEM TEST_OPS test_imperative_static_runner_while
)
list
(
REMOVE_ITEM TEST_OPS test_conv3d_transpose_op
)
# disable this unittest temporarily
list
(
REMOVE_ITEM TEST_OPS test_imperative_data_loader_exception
)
...
...
@@ -697,7 +694,9 @@ set_tests_properties(test_eager_deletion_lstm_net PROPERTIES TIMEOUT 120)
set_tests_properties
(
test_parallel_executor_mnist PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_imperative_ptb_rnn PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_imperative_save_load_v2 PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_conv2d_transpose_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_conv3d_transpose_part2_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_conv3d_transpose_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_prroi_pool_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_multiprocess_dataloader_iterable_dataset_static PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_lstm_cudnn_op PROPERTIES TIMEOUT 120
)
...
...
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
浏览文件 @
ed7aa8f9
...
...
@@ -17,6 +17,8 @@ from __future__ import print_function
import
unittest
import
numpy
as
np
import
paddle
paddle
.
enable_static
()
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
from
op_test
import
OpTest
...
...
@@ -654,101 +656,6 @@ class TestCUDNNWithEvenUpsample_NHWC(TestWithEvenUpsample):
self
.
op_type
=
"conv2d_transpose"
class
TestDepthwiseConvTranspose
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
8
,
16
,
16
]
# NCHW
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
4
,
4
]
self
.
op_type
=
"depthwise_conv2d_transpose"
class
TestDepthwiseConvTransposeAsymmetricPad
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
0
,
1
,
2
]
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
8
,
16
,
16
]
# NCHW
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
data_format
=
'NCHW'
class
TestDepthwiseConvTransposeSAMEPad
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
8
,
16
,
16
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
padding_algorithm
=
'SAME'
class
TestDepthwiseConvTransposeVALIDPad
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
8
,
16
,
16
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
padding_algorithm
=
'VALID'
class
TestDepthwiseConvTranspose_NHWC_4x4kernel
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
16
,
16
,
8
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
3
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
3
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
3
],
f_c
,
4
,
4
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
data_format
=
'NHWC'
class
TestDepthwiseConvTranspose_NHWC_3x3kernel
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
16
,
16
,
8
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
3
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
3
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
3
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
data_format
=
'NHWC'
class
TestDepthwiseConvTransposeAsymmetricPad_NHWC
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
0
,
1
,
2
]
self
.
stride
=
[
2
,
2
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
16
,
16
,
8
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
3
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
3
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
3
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
data_format
=
'NHWC'
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
(),
"core is not compiled with CUDA"
)
class
TestCUDNN_FP16
(
TestConv2DTransposeOp
):
...
...
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op_depthwise_conv.py
0 → 100644
浏览文件 @
ed7aa8f9
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
__future__
import
print_function
import
unittest
import
numpy
as
np
import
paddle
paddle
.
enable_static
()
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
from
op_test
import
OpTest
from
test_conv2d_transpose_op
import
TestConv2DTransposeOp
class
TestDepthwiseConvTranspose
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
1
,
8
,
4
,
4
]
# NCHW
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
4
,
4
]
self
.
op_type
=
"depthwise_conv2d_transpose"
class
TestDepthwiseConvTransposeAsymmetricPad
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
,
1
,
2
]
self
.
stride
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
1
,
8
,
4
,
4
]
# NCHW
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
data_format
=
'NCHW'
class
TestDepthwiseConvTransposeSAMEPad
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
stride
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
1
,
8
,
4
,
4
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
padding_algorithm
=
'SAME'
class
TestDepthwiseConvTransposeVALIDPad
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
stride
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
1
,
8
,
4
,
4
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
1
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
padding_algorithm
=
'VALID'
class
TestDepthwiseConvTranspose_NHWC_3x3kernel
(
TestConv2DTransposeOp
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
1
,
4
,
4
,
8
]
# NHWC
self
.
groups
=
8
assert
np
.
mod
(
self
.
input_size
[
3
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
3
]
//
self
.
groups
self
.
filter_size
=
[
self
.
input_size
[
3
],
f_c
,
3
,
3
]
self
.
op_type
=
"depthwise_conv2d_transpose"
self
.
data_format
=
'NHWC'
if
__name__
==
'__main__'
:
unittest
.
main
()
python/paddle/fluid/tests/unittests/test_conv3d_transpose_op.py
浏览文件 @
ed7aa8f9
...
...
@@ -17,6 +17,8 @@ from __future__ import print_function
import
unittest
import
numpy
as
np
import
paddle
paddle
.
enable_static
()
import
paddle.fluid.core
as
core
import
paddle.fluid
as
fluid
from
op_test
import
OpTest
...
...
@@ -207,7 +209,7 @@ class TestWithSymmetricPad(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -218,7 +220,7 @@ class TestWithAsymmetricPad(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -228,7 +230,7 @@ class TestWithSAMEPad(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
2
]
self
.
dilations
=
[
1
,
2
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
6
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
6
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
4
]
self
.
padding_algorithm
=
'SAME'
...
...
@@ -239,7 +241,7 @@ class TestWithVALIDPad(TestConv3DTransposeOp):
self
.
stride
=
[
2
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
4
,
3
]
self
.
padding_algorithm
=
'VALID'
...
...
@@ -252,7 +254,7 @@ class TestWithStride(TestConv3DTransposeOp):
self
.
stride
=
[
2
,
2
,
2
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -263,7 +265,7 @@ class TestWithGroups(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
2
self
.
input_size
=
[
2
,
4
,
5
,
5
,
5
]
# NCHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
3
,
3
,
3
,
3
]
...
...
@@ -274,7 +276,7 @@ class TestWithDilation(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
2
,
2
,
2
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -285,7 +287,7 @@ class Test_NHWC(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
5
,
5
,
5
,
3
]
# NDHWC
self
.
input_size
=
[
1
,
5
,
5
,
5
,
2
]
# NDHWC
f_c
=
self
.
input_size
[
-
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
self
.
data_format
=
'NHWC'
...
...
@@ -308,7 +310,7 @@ class TestCUDNNWithSymmetricPad(TestWithSymmetricPad):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -325,7 +327,7 @@ class TestCUDNNWithAsymmetricPad(TestWithAsymmetricPad):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
4
,
4
,
4
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
4
,
4
,
4
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -341,7 +343,7 @@ class TestCUDNNWithSAMEPad(TestWithSAMEPad):
self
.
stride
=
[
1
,
1
,
2
]
self
.
dilations
=
[
1
,
2
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
4
,
3
]
self
.
padding_algorithm
=
'SAME'
...
...
@@ -358,7 +360,7 @@ class TestCUDNNWithVALIDPad(TestWithVALIDPad):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
self
.
padding_algorithm
=
'VALID'
...
...
@@ -376,7 +378,7 @@ class TestCUDNNWithStride(TestWithStride):
self
.
stride
=
[
2
,
2
,
2
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
3
,
5
,
5
,
5
]
# NCDHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCDHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
...
...
@@ -393,7 +395,7 @@ class TestCUDNNWithGroups(TestWithGroups):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
2
self
.
input_size
=
[
2
,
4
,
5
,
5
,
5
]
# NCHW
self
.
input_size
=
[
1
,
2
,
5
,
5
,
5
]
# NCHW
f_c
=
self
.
input_size
[
1
]
self
.
filter_size
=
[
f_c
,
3
,
3
,
3
,
3
]
...
...
@@ -425,7 +427,7 @@ class TestCUDNN_NHWC(TestConv3DTransposeOp):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
5
,
5
,
5
,
3
]
# NDHWC
self
.
input_size
=
[
1
,
5
,
5
,
5
,
2
]
# NDHWC
f_c
=
self
.
input_size
[
-
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
self
.
data_format
=
'NHWC'
...
...
@@ -443,7 +445,7 @@ class TestCUDNNWithSymmetricPad_NHWC(TestWithSymmetricPad):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
5
,
5
,
5
,
3
]
# NDHWC
self
.
input_size
=
[
1
,
5
,
5
,
5
,
2
]
# NDHWC
f_c
=
self
.
input_size
[
-
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
self
.
data_format
=
'NHWC'
...
...
@@ -461,7 +463,7 @@ class TestCUDNNWithAsymmetricPad_NHWC(TestWithAsymmetricPad):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
5
,
5
,
5
,
3
]
# NDHWC
self
.
input_size
=
[
1
,
5
,
5
,
5
,
2
]
# NDHWC
f_c
=
self
.
input_size
[
-
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
self
.
data_format
=
'NHWC'
...
...
@@ -479,7 +481,7 @@ class TestCUDNNWithStride_NHWC(TestWithStride):
self
.
stride
=
[
2
,
2
,
2
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
1
self
.
input_size
=
[
2
,
5
,
5
,
5
,
3
]
# NCDHW
self
.
input_size
=
[
1
,
5
,
5
,
5
,
2
]
# NDHWC
f_c
=
self
.
input_size
[
-
1
]
self
.
filter_size
=
[
f_c
,
6
,
3
,
3
,
3
]
self
.
data_format
=
'NHWC'
...
...
@@ -497,7 +499,7 @@ class TestCUDNNWithGroups_NHWC(TestWithGroups):
self
.
stride
=
[
1
,
1
,
1
]
self
.
dilations
=
[
1
,
1
,
1
]
self
.
groups
=
2
self
.
input_size
=
[
2
,
5
,
5
,
5
,
4
]
# NCHW
self
.
input_size
=
[
1
,
5
,
5
,
5
,
2
]
# NDHWC
f_c
=
self
.
input_size
[
-
1
]
self
.
filter_size
=
[
f_c
,
3
,
3
,
3
,
3
]
self
.
data_format
=
'NHWC'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录