Skip to content

Commit 79ab297

Browse files
committed
Fix bugs
1 parent a04cfe4 commit 79ab297

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

test/legacy_test/test_margin_cross_entropy_op.py

+4-12
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ def setUp(self):
150150
}
151151

152152
def test_check_output(self):
153-
self.check_output_with_place(
154-
core.CUDAPlace(0), atol=1e-5, check_pir=True
155-
)
153+
self.check_output_with_place(core.CUDAPlace(0), check_pir=True)
156154

157155
def test_check_grad(self):
158156
self.check_grad_with_place(
@@ -186,9 +184,7 @@ def init_dtype(self):
186184
self.dtype = np.float16
187185

188186
def test_check_output(self):
189-
self.check_output_with_place(
190-
core.CUDAPlace(0), atol=5e-2, check_pir=True
191-
)
187+
self.check_output_with_place(core.CUDAPlace(0), check_pir=True)
192188

193189
def test_check_grad(self):
194190
self.check_grad_with_place(
@@ -274,9 +270,7 @@ def setUp(self):
274270
}
275271

276272
def test_check_output(self):
277-
self.check_output_with_place(
278-
core.CUDAPlace(0), atol=5e-2, check_pir=True
279-
)
273+
self.check_output_with_place(core.CUDAPlace(0), check_pir=True)
280274

281275
def test_check_grad(self):
282276
self.check_grad_with_place(
@@ -314,9 +308,7 @@ def init_loss_params(self):
314308
class TestMarginCrossEntropyOpCPU(TestMarginCrossEntropyOp):
315309
def test_check_output(self):
316310
try:
317-
self.check_output_with_place(
318-
core.CPUPlace(), atol=1e-5, check_pir=True
319-
)
311+
self.check_output_with_place(core.CPUPlace(), check_pir=True)
320312
except RuntimeError:
321313
pass
322314

0 commit comments

Comments
 (0)