Skip to content

Commit ccbb285

Browse files
committed
Increase the max_relative_error in TestConv2dOp.
1 parent c42e204 commit ccbb285

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

python/paddle/v2/framework/tests/test_conv2d_op.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,22 @@ def test_check_output(self):
7373
self.check_output()
7474

7575
def test_check_grad(self):
76-
self.check_grad(set(['Input', 'Filter']), 'Output')
76+
self.check_grad(
77+
set(['Input', 'Filter']), 'Output', max_relative_error=0.05)
7778

7879
def test_check_grad_no_filter(self):
79-
self.check_grad(['Input'], 'Output', no_grad_set=set(['Filter']))
80+
self.check_grad(
81+
['Input'],
82+
'Output',
83+
max_relative_error=0.05,
84+
no_grad_set=set(['Filter']))
8085

8186
def test_check_grad_no_input(self):
82-
self.check_grad(['Filter'], 'Output', no_grad_set=set(['Input']))
87+
self.check_grad(
88+
['Filter'],
89+
'Output',
90+
max_relative_error=0.05,
91+
no_grad_set=set(['Input']))
8392

8493
def init_groups(self):
8594
self.groups = 1

0 commit comments

Comments
 (0)