Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
afeixing77
Paddle
提交
c8b90d8f
P
Paddle
项目概览
afeixing77
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c8b90d8f
编写于
2月 05, 2020
作者:
B
Bai Yifan
提交者:
GitHub
2月 05, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix deformable_conv small cases, test=develop (#22441)
上级
943cb8c6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
27 deletion
+5
-27
python/paddle/fluid/tests/unittests/test_deformable_conv_op.py
...n/paddle/fluid/tests/unittests/test_deformable_conv_op.py
+5
-26
python/paddle/fluid/tests/unittests/white_list/check_shape_white_list.py
...luid/tests/unittests/white_list/check_shape_white_list.py
+0
-1
未找到文件。
python/paddle/fluid/tests/unittests/test_deformable_conv_op.py
浏览文件 @
c8b90d8f
...
@@ -154,32 +154,11 @@ class TestModulatedDeformableConvOp(OpTest):
...
@@ -154,32 +154,11 @@ class TestModulatedDeformableConvOp(OpTest):
'Output'
,
'Output'
,
max_relative_error
=
0.05
)
max_relative_error
=
0.05
)
def
test_check_grad_no_filter
(
self
):
self
.
check_grad
(
[
'Input'
,
'Offset'
,
'Mask'
],
'Output'
,
max_relative_error
=
0.1
,
no_grad_set
=
set
([
'Filter'
]))
def
test_check_grad_no_input
(
self
):
self
.
check_grad
(
[
'Filter'
,
'Offset'
,
'Mask'
],
'Output'
,
max_relative_error
=
0.1
,
no_grad_set
=
set
([
'Input'
]))
def
test_check_grad_no_offset_no_mask
(
self
):
self
.
check_grad
(
[
'Input'
,
'Filter'
],
'Output'
,
max_relative_error
=
0.1
,
no_grad_set
=
set
([
'Offset'
,
'Mask'
]))
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
pad
=
[
1
,
1
]
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
dilations
=
[
1
,
1
]
self
.
input_size
=
[
2
,
4
,
4
,
4
]
# NCHW
self
.
input_size
=
[
2
,
8
,
4
,
4
]
# NCHW
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
4
,
f_c
,
3
,
3
]
self
.
filter_size
=
[
4
,
f_c
,
3
,
3
]
...
@@ -229,7 +208,7 @@ class TestWithDilation(TestModulatedDeformableConvOp):
...
@@ -229,7 +208,7 @@ class TestWithDilation(TestModulatedDeformableConvOp):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
pad
=
[
2
,
2
]
self
.
pad
=
[
2
,
2
]
self
.
stride
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
input_size
=
[
2
,
3
,
4
,
4
]
# NCHW
self
.
input_size
=
[
4
,
3
,
4
,
4
]
# NCHW
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
6
,
f_c
,
3
,
3
]
self
.
filter_size
=
[
6
,
f_c
,
3
,
3
]
...
@@ -250,14 +229,14 @@ class TestWithDilation(TestModulatedDeformableConvOp):
...
@@ -250,14 +229,14 @@ class TestWithDilation(TestModulatedDeformableConvOp):
self
.
dilations
=
[
2
,
2
]
self
.
dilations
=
[
2
,
2
]
class
TestWith
1x1
(
TestModulatedDeformableConvOp
):
class
TestWith
3x3
(
TestModulatedDeformableConvOp
):
def
init_test_case
(
self
):
def
init_test_case
(
self
):
self
.
pad
=
[
0
,
0
]
self
.
pad
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
stride
=
[
1
,
1
]
self
.
input_size
=
[
2
,
3
,
5
,
5
]
# NCHW
self
.
input_size
=
[
2
,
3
,
5
,
5
]
# NCHW
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
assert
np
.
mod
(
self
.
input_size
[
1
],
self
.
groups
)
==
0
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
f_c
=
self
.
input_size
[
1
]
//
self
.
groups
self
.
filter_size
=
[
6
,
f_c
,
1
,
1
]
self
.
filter_size
=
[
6
,
f_c
,
3
,
3
]
self
.
im2col_step
=
1
self
.
im2col_step
=
1
self
.
deformable_groups
=
1
self
.
deformable_groups
=
1
offset_c
=
2
*
self
.
deformable_groups
*
self
.
filter_size
[
offset_c
=
2
*
self
.
deformable_groups
*
self
.
filter_size
[
...
...
python/paddle/fluid/tests/unittests/white_list/check_shape_white_list.py
浏览文件 @
c8b90d8f
...
@@ -21,7 +21,6 @@ NEED_TO_FIX_OP_LIST = [
...
@@ -21,7 +21,6 @@ NEED_TO_FIX_OP_LIST = [
'fused_elemwise_activation'
,
'fused_elemwise_activation'
,
'bilinear_tensor_product'
,
'bilinear_tensor_product'
,
'conv2d_transpose'
,
'conv2d_transpose'
,
'deformable_conv'
,
'depthwise_conv2d_transpose'
,
'depthwise_conv2d_transpose'
,
'grid_sampler'
,
'grid_sampler'
,
'hierarchical_sigmoid'
,
'hierarchical_sigmoid'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录