leezu opened a new issue #18381: URL: https://github.com/apache/incubator-mxnet/issues/18381
## Description https://github.com/apache/incubator-mxnet/blob/0210ce2c136afaa0f57666e5e1c659cab353f5f3/tests/python/unittest/test_gluon.py#L1423-L1434 is actually a no-op by mistake. Upon enabling the test as follows: ``` gelu = mx.gluon.nn.GELU() def gelu_test(x): CUBE_CONSTANT = 0.044715 ROOT_TWO_OVER_PI = 0.7978845608028654 def g(x): return ROOT_TWO_OVER_PI * (x + CUBE_CONSTANT * x * x * x) def f(x): return 1.0 + mx.nd.tanh(g(x)) def gelu(x): return 0.5 * x * f(x) return [gelu(x_i) for x_i in x] for test_point, ref_point in zip(gelu_test(point_to_validate), gelu(point_to_validate)): assert test_point == ref_point ``` the tests fails frequently ``` [2020-05-21T19:13:03.252Z] for test_point, ref_point in zip(gelu_test(point_to_validate), gelu(point_to_validate)): [2020-05-21T19:13:03.252Z] > assert test_point == ref_point [2020-05-21T19:13:03.252Z] E assert \n[-0.04601725...ray 1 @cpu(0)> == \n[-0.04601722...ray 1 @cpu(0)> [2020-05-21T19:13:03.252Z] E -\n [2020-05-21T19:13:03.252Z] E -[-0.04601725]\n [2020-05-21T19:13:03.252Z] E -<NDArray 1 @cpu(0)> [2020-05-21T19:13:03.252Z] E +\n [2020-05-21T19:13:03.252Z] E +[-0.04601722]\n [2020-05-21T19:13:03.252Z] E +<NDArray 1 @cpu(0)> [2020-05-21T19:13:03.252Z] E Full diff: [2020-05-21T19:13:03.252Z] E [2020-05-21T19:13:03.252Z] E - [-0.04601725] [2020-05-21T19:13:03.252Z] E ? ^ [2020-05-21T19:13:03.252Z] E + [-0.04601722] [2020-05-21T19:13:03.252Z] E ? ^ [2020-05-21T19:13:03.252Z] E <NDArray 1 @cpu(0)> ``` http://jenkins.mxnet-ci.amazon-ml.com/blue/rest/organizations/jenkins/pipelines/mxnet-validation/pipelines/unix-cpu/branches/PR-18376/runs/5/nodes/363/steps/738/log/?start=0 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
