Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
eab124ba
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
eab124ba
编写于
12月 18, 2019
作者:
G
GaoWei8
提交者:
Tao Luo
12月 18, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix accuracy parameters of op tests (#21813)
test=develop
上级
642b3356
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
11 addition
and
30 deletion
+11
-30
python/paddle/fluid/tests/unittests/test_add_position_encoding_op.py
...le/fluid/tests/unittests/test_add_position_encoding_op.py
+2
-4
python/paddle/fluid/tests/unittests/test_affine_grid_op.py
python/paddle/fluid/tests/unittests/test_affine_grid_op.py
+1
-5
python/paddle/fluid/tests/unittests/test_clip_op.py
python/paddle/fluid/tests/unittests/test_clip_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_elementwise_add_op.py
...n/paddle/fluid/tests/unittests/test_elementwise_add_op.py
+1
-6
python/paddle/fluid/tests/unittests/test_group_norm_op.py
python/paddle/fluid/tests/unittests/test_group_norm_op.py
+2
-4
python/paddle/fluid/tests/unittests/test_kldiv_loss_op.py
python/paddle/fluid/tests/unittests/test_kldiv_loss_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_l1_norm_op.py
python/paddle/fluid/tests/unittests/test_l1_norm_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py
python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py
+0
-1
python/paddle/fluid/tests/unittests/test_match_matrix_tensor_op.py
...ddle/fluid/tests/unittests/test_match_matrix_tensor_op.py
+1
-2
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
+1
-2
未找到文件。
python/paddle/fluid/tests/unittests/test_add_position_encoding_op.py
浏览文件 @
eab124ba
...
@@ -45,8 +45,7 @@ class TestAddPositionEncodingTensorOp(OpTest):
...
@@ -45,8 +45,7 @@ class TestAddPositionEncodingTensorOp(OpTest):
"""
"""
check the correctness of grad
check the correctness of grad
"""
"""
self
.
check_grad
(
self
.
check_grad
([
'X'
],
'Out'
,
check_dygraph
=
False
)
[
'X'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
False
)
def
init_input_output
(
self
):
def
init_input_output
(
self
):
"""
"""
...
@@ -100,8 +99,7 @@ class TestAddPositionEncodingLoDTensorOp(OpTest):
...
@@ -100,8 +99,7 @@ class TestAddPositionEncodingLoDTensorOp(OpTest):
"""
"""
check the correctness of grad
check the correctness of grad
"""
"""
self
.
check_grad
(
self
.
check_grad
([
'X'
],
'Out'
,
check_dygraph
=
False
)
[
'X'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
False
)
def
init_input_output
(
self
):
def
init_input_output
(
self
):
"""
"""
...
...
python/paddle/fluid/tests/unittests/test_affine_grid_op.py
浏览文件 @
eab124ba
...
@@ -56,11 +56,7 @@ class TestAffineGridOp(OpTest):
...
@@ -56,11 +56,7 @@ class TestAffineGridOp(OpTest):
self
.
check_output
()
self
.
check_output
()
def
test_check_grad_normal
(
self
):
def
test_check_grad_normal
(
self
):
self
.
check_grad
(
self
.
check_grad
([
'Theta'
],
'Output'
,
no_grad_set
=
[
'OutputShape'
])
[
'Theta'
],
'Output'
,
no_grad_set
=
[
'OutputShape'
],
max_relative_error
=
0.006
)
def
initTestCase
(
self
):
def
initTestCase
(
self
):
self
.
theta_shape
=
(
17
,
2
,
3
)
self
.
theta_shape
=
(
17
,
2
,
3
)
...
...
python/paddle/fluid/tests/unittests/test_clip_op.py
浏览文件 @
eab124ba
...
@@ -40,8 +40,7 @@ class TestClipOp(OpTest):
...
@@ -40,8 +40,7 @@ class TestClipOp(OpTest):
self
.
check_output
()
self
.
check_output
()
def
test_check_grad_normal
(
self
):
def
test_check_grad_normal
(
self
):
self
.
check_grad
(
self
.
check_grad
([
'X'
],
'Out'
)
[
'X'
],
'Out'
,
max_relative_error
=
self
.
max_relative_error
)
def
initTestCase
(
self
):
def
initTestCase
(
self
):
self
.
shape
=
(
4
,
4
)
self
.
shape
=
(
4
,
4
)
...
...
python/paddle/fluid/tests/unittests/test_elementwise_add_op.py
浏览文件 @
eab124ba
...
@@ -50,10 +50,7 @@ class TestElementwiseAddOp(OpTest):
...
@@ -50,10 +50,7 @@ class TestElementwiseAddOp(OpTest):
if
self
.
dtype
==
np
.
float16
:
if
self
.
dtype
==
np
.
float16
:
return
return
self
.
check_grad
(
self
.
check_grad
(
[
'X'
,
'Y'
],
[
'X'
,
'Y'
],
'Out'
,
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
def
test_check_grad_ingore_x
(
self
):
def
test_check_grad_ingore_x
(
self
):
# TODO(wangzhongpu): support mkldnn op in dygraph mode
# TODO(wangzhongpu): support mkldnn op in dygraph mode
...
@@ -62,7 +59,6 @@ class TestElementwiseAddOp(OpTest):
...
@@ -62,7 +59,6 @@ class TestElementwiseAddOp(OpTest):
self
.
check_grad
(
self
.
check_grad
(
[
'Y'
],
[
'Y'
],
'Out'
,
'Out'
,
max_relative_error
=
0.005
,
no_grad_set
=
set
(
"X"
),
no_grad_set
=
set
(
"X"
),
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
...
@@ -73,7 +69,6 @@ class TestElementwiseAddOp(OpTest):
...
@@ -73,7 +69,6 @@ class TestElementwiseAddOp(OpTest):
self
.
check_grad
(
self
.
check_grad
(
[
'X'
],
[
'X'
],
'Out'
,
'Out'
,
max_relative_error
=
0.005
,
no_grad_set
=
set
(
'Y'
),
no_grad_set
=
set
(
'Y'
),
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
...
...
python/paddle/fluid/tests/unittests/test_group_norm_op.py
浏览文件 @
eab124ba
...
@@ -105,15 +105,13 @@ class TestGroupNormOp(OpTest):
...
@@ -105,15 +105,13 @@ class TestGroupNormOp(OpTest):
return
return
place
=
core
.
CPUPlace
()
place
=
core
.
CPUPlace
()
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
set
([
'X'
,
'Scale'
,
'Bias'
]),
'Y'
)
place
,
set
([
'X'
,
'Scale'
,
'Bias'
]),
'Y'
,
max_relative_error
=
0.01
)
if
core
.
is_compiled_with_cuda
():
if
core
.
is_compiled_with_cuda
():
place
=
core
.
CUDAPlace
(
0
)
place
=
core
.
CUDAPlace
(
0
)
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
place
,
set
([
'X'
,
'Scale'
,
'Bias'
]),
set
([
'X'
,
'Scale'
,
'Bias'
]),
'Y'
,
'Y'
,
)
max_relative_error
=
0.005
)
def
init_test_case
(
self
):
def
init_test_case
(
self
):
pass
pass
...
...
python/paddle/fluid/tests/unittests/test_kldiv_loss_op.py
浏览文件 @
eab124ba
...
@@ -52,8 +52,7 @@ class TestKLDivLossOp(OpTest):
...
@@ -52,8 +52,7 @@ class TestKLDivLossOp(OpTest):
self
.
check_output
()
self
.
check_output
()
def
test_check_grad
(
self
):
def
test_check_grad
(
self
):
self
.
check_grad
(
self
.
check_grad
([
'X'
],
'Loss'
,
no_grad_set
=
set
([
"Target"
]))
[
'X'
],
'Loss'
,
no_grad_set
=
set
([
"Target"
]),
max_relative_error
=
0.06
)
def
initTestCase
(
self
):
def
initTestCase
(
self
):
self
.
x_shape
=
(
4
,
5
,
5
)
self
.
x_shape
=
(
4
,
5
,
5
)
...
...
python/paddle/fluid/tests/unittests/test_l1_norm_op.py
浏览文件 @
eab124ba
...
@@ -36,8 +36,7 @@ class TestL1NormOp(OpTest):
...
@@ -36,8 +36,7 @@ class TestL1NormOp(OpTest):
self
.
check_output
()
self
.
check_output
()
def
test_check_grad
(
self
):
def
test_check_grad
(
self
):
self
.
check_grad
(
self
.
check_grad
([
'X'
],
'Out'
)
[
'X'
],
'Out'
,
max_relative_error
=
self
.
max_relative_error
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py
浏览文件 @
eab124ba
...
@@ -183,7 +183,6 @@ class TestCUDNNLstmOp(OpTest):
...
@@ -183,7 +183,6 @@ class TestCUDNNLstmOp(OpTest):
self
.
check_grad_with_place
(
self
.
check_grad_with_place
(
place
,
place
,
set
([
'Input'
,
'W'
,
'InitH'
,
'InitC'
]),
[
'Out'
,
'last_h'
,
'last_c'
],
set
([
'Input'
,
'W'
,
'InitH'
,
'InitC'
]),
[
'Out'
,
'last_h'
,
'last_c'
],
max_relative_error
=
0.02
,
check_dygraph
=
False
)
check_dygraph
=
False
)
...
...
python/paddle/fluid/tests/unittests/test_match_matrix_tensor_op.py
浏览文件 @
eab124ba
...
@@ -74,8 +74,7 @@ class TestMatchMatrixTensorOp(OpTest):
...
@@ -74,8 +74,7 @@ class TestMatchMatrixTensorOp(OpTest):
self
.
check_output
(
check_compile_vs_runtime
=
True
,
check_dygraph
=
False
)
self
.
check_output
(
check_compile_vs_runtime
=
True
,
check_dygraph
=
False
)
def
test_check_grad
(
self
):
def
test_check_grad
(
self
):
self
.
check_grad
(
self
.
check_grad
([
'X'
,
'Y'
],
'Out'
,
check_dygraph
=
False
)
[
'X'
,
'Y'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
False
)
class
TestMatchMatrixTensorOpCase1
(
TestMatchMatrixTensorOp
):
class
TestMatchMatrixTensorOpCase1
(
TestMatchMatrixTensorOp
):
...
...
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
浏览文件 @
eab124ba
...
@@ -96,8 +96,7 @@ class TestSpectralNormOp(TestSpectralNormOpNoGrad):
...
@@ -96,8 +96,7 @@ class TestSpectralNormOp(TestSpectralNormOpNoGrad):
self
.
check_grad
(
self
.
check_grad
(
[
'Weight'
],
[
'Weight'
],
'Out'
,
'Out'
,
no_grad_set
=
set
([
"U"
,
"V"
]),
no_grad_set
=
set
([
"U"
,
"V"
]),
)
max_relative_error
=
0.1
)
def
initTestCase
(
self
):
def
initTestCase
(
self
):
self
.
weight_shape
=
(
10
,
12
)
self
.
weight_shape
=
(
10
,
12
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录