larroy commented on issue #9853: Flaky test_operator.test_binary_op
URL: 
https://github.com/apache/incubator-mxnet/issues/9853#issuecomment-386885128
 
 
   reproducible 100% with export MXNET_TEST_SEED=1688524483
   
   nosetests-3.4 -s -v test_operator_gpu.py:test_binary_op
   
   ```
   diff --git a/tests/python/unittest/test_operator.py 
b/tests/python/unittest/test_operator.py
   index 5d38222..04e880c 100644
   --- a/tests/python/unittest/test_operator.py
   +++ b/tests/python/unittest/test_operator.py
   @@ -1429,6 +1429,16 @@ def check_binary_op_backward(symbol, baseline, 
gen_data, rtol=1e-3, atol=1e-5):
            y.forward(is_train=True)
            y.backward([mx.nd.array(out)])
            assert_allclose(y_1.asnumpy(), x_1, rtol=rtol, atol=atol)
   +        z = np.abs(y_2.asnumpy() - x_2)
   +        w = np.where(z>atol)
   +        if w[0].size > 0:
   +            print("d[0].shape: {} d[1].shape: {} baseline_grad2.shape: 
{}".format(d[0].shape, d[1].shape, baseline_grad2.shape))
   +            print(w)
   +            print(y_2[w])
   +            print(x_2[w])
   +            print(z[w])
   +            print(d[0][w])
   +            print(d[1][w])
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to