Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
eab124ba
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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):
"""
check the correctness of grad
"""
self
.
check_grad
(
[
'X'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
False
)
self
.
check_grad
([
'X'
],
'Out'
,
check_dygraph
=
False
)
def
init_input_output
(
self
):
"""
...
...
@@ -100,8 +99,7 @@ class TestAddPositionEncodingLoDTensorOp(OpTest):
"""
check the correctness of grad
"""
self
.
check_grad
(
[
'X'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
False
)
self
.
check_grad
([
'X'
],
'Out'
,
check_dygraph
=
False
)
def
init_input_output
(
self
):
"""
...
...
python/paddle/fluid/tests/unittests/test_affine_grid_op.py
浏览文件 @
eab124ba
...
...
@@ -56,11 +56,7 @@ class TestAffineGridOp(OpTest):
self
.
check_output
()
def
test_check_grad_normal
(
self
):
self
.
check_grad
(
[
'Theta'
],
'Output'
,
no_grad_set
=
[
'OutputShape'
],
max_relative_error
=
0.006
)
self
.
check_grad
([
'Theta'
],
'Output'
,
no_grad_set
=
[
'OutputShape'
])
def
initTestCase
(
self
):
self
.
theta_shape
=
(
17
,
2
,
3
)
...
...
python/paddle/fluid/tests/unittests/test_clip_op.py
浏览文件 @
eab124ba
...
...
@@ -40,8 +40,7 @@ class TestClipOp(OpTest):
self
.
check_output
()
def
test_check_grad_normal
(
self
):
self
.
check_grad
(
[
'X'
],
'Out'
,
max_relative_error
=
self
.
max_relative_error
)
self
.
check_grad
([
'X'
],
'Out'
)
def
initTestCase
(
self
):
self
.
shape
=
(
4
,
4
)
...
...
python/paddle/fluid/tests/unittests/test_elementwise_add_op.py
浏览文件 @
eab124ba
...
...
@@ -50,10 +50,7 @@ class TestElementwiseAddOp(OpTest):
if
self
.
dtype
==
np
.
float16
:
return
self
.
check_grad
(
[
'X'
,
'Y'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
[
'X'
,
'Y'
],
'Out'
,
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
def
test_check_grad_ingore_x
(
self
):
# TODO(wangzhongpu): support mkldnn op in dygraph mode
...
...
@@ -62,7 +59,6 @@ class TestElementwiseAddOp(OpTest):
self
.
check_grad
(
[
'Y'
],
'Out'
,
max_relative_error
=
0.005
,
no_grad_set
=
set
(
"X"
),
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
...
...
@@ -73,7 +69,6 @@ class TestElementwiseAddOp(OpTest):
self
.
check_grad
(
[
'X'
],
'Out'
,
max_relative_error
=
0.005
,
no_grad_set
=
set
(
'Y'
),
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
...
...
python/paddle/fluid/tests/unittests/test_group_norm_op.py
浏览文件 @
eab124ba
...
...
@@ -105,15 +105,13 @@ class TestGroupNormOp(OpTest):
return
place
=
core
.
CPUPlace
()
self
.
check_grad_with_place
(
place
,
set
([
'X'
,
'Scale'
,
'Bias'
]),
'Y'
,
max_relative_error
=
0.01
)
self
.
check_grad_with_place
(
place
,
set
([
'X'
,
'Scale'
,
'Bias'
]),
'Y'
)
if
core
.
is_compiled_with_cuda
():
place
=
core
.
CUDAPlace
(
0
)
self
.
check_grad_with_place
(
place
,
set
([
'X'
,
'Scale'
,
'Bias'
]),
'Y'
,
max_relative_error
=
0.005
)
'Y'
,
)
def
init_test_case
(
self
):
pass
...
...
python/paddle/fluid/tests/unittests/test_kldiv_loss_op.py
浏览文件 @
eab124ba
...
...
@@ -52,8 +52,7 @@ class TestKLDivLossOp(OpTest):
self
.
check_output
()
def
test_check_grad
(
self
):
self
.
check_grad
(
[
'X'
],
'Loss'
,
no_grad_set
=
set
([
"Target"
]),
max_relative_error
=
0.06
)
self
.
check_grad
([
'X'
],
'Loss'
,
no_grad_set
=
set
([
"Target"
]))
def
initTestCase
(
self
):
self
.
x_shape
=
(
4
,
5
,
5
)
...
...
python/paddle/fluid/tests/unittests/test_l1_norm_op.py
浏览文件 @
eab124ba
...
...
@@ -36,8 +36,7 @@ class TestL1NormOp(OpTest):
self
.
check_output
()
def
test_check_grad
(
self
):
self
.
check_grad
(
[
'X'
],
'Out'
,
max_relative_error
=
self
.
max_relative_error
)
self
.
check_grad
([
'X'
],
'Out'
)
if
__name__
==
"__main__"
:
...
...
python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py
浏览文件 @
eab124ba
...
...
@@ -183,7 +183,6 @@ class TestCUDNNLstmOp(OpTest):
self
.
check_grad_with_place
(
place
,
set
([
'Input'
,
'W'
,
'InitH'
,
'InitC'
]),
[
'Out'
,
'last_h'
,
'last_c'
],
max_relative_error
=
0.02
,
check_dygraph
=
False
)
...
...
python/paddle/fluid/tests/unittests/test_match_matrix_tensor_op.py
浏览文件 @
eab124ba
...
...
@@ -74,8 +74,7 @@ class TestMatchMatrixTensorOp(OpTest):
self
.
check_output
(
check_compile_vs_runtime
=
True
,
check_dygraph
=
False
)
def
test_check_grad
(
self
):
self
.
check_grad
(
[
'X'
,
'Y'
],
'Out'
,
max_relative_error
=
0.005
,
check_dygraph
=
False
)
self
.
check_grad
([
'X'
,
'Y'
],
'Out'
,
check_dygraph
=
False
)
class
TestMatchMatrixTensorOpCase1
(
TestMatchMatrixTensorOp
):
...
...
python/paddle/fluid/tests/unittests/test_spectral_norm_op.py
浏览文件 @
eab124ba
...
...
@@ -96,8 +96,7 @@ class TestSpectralNormOp(TestSpectralNormOpNoGrad):
self
.
check_grad
(
[
'Weight'
],
'Out'
,
no_grad_set
=
set
([
"U"
,
"V"
]),
max_relative_error
=
0.1
)
no_grad_set
=
set
([
"U"
,
"V"
]),
)
def
initTestCase
(
self
):
self
.
weight_shape
=
(
10
,
12
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录