Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
2b1f08c7
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看板
提交
2b1f08c7
编写于
12月 20, 2019
作者:
G
GaoWei8
提交者:
Tao Luo
12月 20, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove self-set accuracy parameters of op tests: max_relative_error (#21815)
上级
406d7ee2
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
7 addition
and
32 deletion
+7
-32
python/paddle/fluid/tests/unittests/test_conv2d_op.py
python/paddle/fluid/tests/unittests/test_conv2d_op.py
+4
-18
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
.../paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
+3
-14
未找到文件。
python/paddle/fluid/tests/unittests/test_conv2d_op.py
浏览文件 @
2b1f08c7
...
@@ -151,19 +151,13 @@ def create_test_cudnn_fp16_class(parent, grad_check=True):
...
@@ -151,19 +151,13 @@ def create_test_cudnn_fp16_class(parent, grad_check=True):
place
=
core
.
CUDAPlace
(
0
)
place
=
core
.
CUDAPlace
(
0
)
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Input'
],
place
,
[
'Input'
],
'Output'
,
no_grad_set
=
set
([
'Filter'
]))
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Filter'
]))
def
test_check_grad_no_input
(
self
):
def
test_check_grad_no_input
(
self
):
place
=
core
.
CUDAPlace
(
0
)
place
=
core
.
CUDAPlace
(
0
)
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Filter'
],
place
,
[
'Filter'
],
'Output'
,
no_grad_set
=
set
([
'Input'
]))
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Input'
]))
cls_name
=
"{0}_{1}"
.
format
(
parent
.
__name__
,
"CUDNNFp16"
)
cls_name
=
"{0}_{1}"
.
format
(
parent
.
__name__
,
"CUDNNFp16"
)
TestConv2DCUDNNFp16
.
__name__
=
cls_name
TestConv2DCUDNNFp16
.
__name__
=
cls_name
...
@@ -221,19 +215,13 @@ def create_test_cudnn_channel_last_fp16_class(parent, grad_check=True):
...
@@ -221,19 +215,13 @@ def create_test_cudnn_channel_last_fp16_class(parent, grad_check=True):
place
=
core
.
CUDAPlace
(
0
)
place
=
core
.
CUDAPlace
(
0
)
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Input'
],
place
,
[
'Input'
],
'Output'
,
no_grad_set
=
set
([
'Filter'
]))
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Filter'
]))
def
test_check_grad_no_input
(
self
):
def
test_check_grad_no_input
(
self
):
place
=
core
.
CUDAPlace
(
0
)
place
=
core
.
CUDAPlace
(
0
)
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
if
core
.
is_float16_supported
(
place
)
and
grad_check
:
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Filter'
],
place
,
[
'Filter'
],
'Output'
,
no_grad_set
=
set
([
'Input'
]))
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Input'
]))
def
init_data_format
(
self
):
def
init_data_format
(
self
):
self
.
data_format
=
"NHWC"
self
.
data_format
=
"NHWC"
...
@@ -397,7 +385,6 @@ class TestConv2dOp(OpTest):
...
@@ -397,7 +385,6 @@ class TestConv2dOp(OpTest):
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Filter'
],
place
,
[
'Filter'
],
'Output'
,
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Input'
]),
no_grad_set
=
set
([
'Input'
]),
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
...
@@ -827,7 +814,6 @@ class TestConv2dOp_v2(OpTest):
...
@@ -827,7 +814,6 @@ class TestConv2dOp_v2(OpTest):
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Filter'
],
place
,
[
'Filter'
],
'Output'
,
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Input'
]),
no_grad_set
=
set
([
'Input'
]),
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
...
...
python/paddle/fluid/tests/unittests/test_conv2d_transpose_op.py
浏览文件 @
2b1f08c7
...
@@ -160,26 +160,15 @@ class TestConv2dTransposeOp(OpTest):
...
@@ -160,26 +160,15 @@ class TestConv2dTransposeOp(OpTest):
max_relative_error
=
0.02
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Input'
]))
no_grad_set
=
set
([
'Input'
]))
else
:
else
:
self
.
check_grad
(
self
.
check_grad
([
'Filter'
],
'Output'
,
no_grad_set
=
set
([
'Input'
]))
[
'Filter'
],
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Input'
]))
def
test_check_grad_no_filter
(
self
):
def
test_check_grad_no_filter
(
self
):
if
self
.
use_cudnn
:
if
self
.
use_cudnn
:
place
=
core
.
CUDAPlace
(
0
)
place
=
core
.
CUDAPlace
(
0
)
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
[
'Input'
],
place
,
[
'Input'
],
'Output'
,
no_grad_set
=
set
([
'Filter'
]))
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Filter'
]))
else
:
else
:
self
.
check_grad
(
self
.
check_grad
([
'Input'
],
'Output'
,
no_grad_set
=
set
([
'Filter'
]))
[
'Input'
],
'Output'
,
max_relative_error
=
0.02
,
no_grad_set
=
set
([
'Filter'
]))
def
test_check_grad
(
self
):
def
test_check_grad
(
self
):
if
self
.
use_cudnn
:
if
self
.
use_cudnn
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录