forked from mindspore-Ecosystem/mindspore
Fix the mish_grad test case.
This commit is contained in:
parent
c03f481902
commit
6409772e72
|
@ -182,5 +182,5 @@ def test_mish_grad_dynamic_shape(mode):
|
|||
output = MishGradDynamicShapeNet(MishNet())(x, dout)
|
||||
expect_output = np.array([[18.000065, 0.12141099, 0.],
|
||||
[12., 1.0490363, 2.1],
|
||||
[11., 4.218619, 0.21672803]], dtype=np.float32)
|
||||
np.testing.assert_almost_equal(output[0].asnumpy(), expect_output)
|
||||
[11., 4.218617, 0.2167282]], dtype=np.float32)
|
||||
assert np.allclose(output[0].asnumpy(), expect_output, atol=1e-4, rtol=1e-4, equal_nan=True)
|
||||
|
|
|
@ -200,4 +200,4 @@ def test_mish_grad_dynamic_shape(mode):
|
|||
[-0.24231756, -1.1413976, -0.6648672]],
|
||||
[[-1.3482721, 0.22441003, 0.05531899],
|
||||
[-0.41695648, -1.2767013, 0.12779452]]]]).astype(np.float32)
|
||||
np.testing.assert_almost_equal(output[0].asnumpy(), expect_output)
|
||||
assert np.allclose(output[0].asnumpy(), expect_output, atol=1e-4, rtol=1e-4, equal_nan=True)
|
||||
|
|
Loading…
Reference in New Issue