You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/08/28 06:44:13 UTC

[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #19028: Add size check for numpy ctc loss

Zha0q1 commented on a change in pull request #19028:
URL: https://github.com/apache/incubator-mxnet/pull/19028#discussion_r478863339



##########
File path: tests/nightly/test_np_large_array.py
##########
@@ -905,17 +905,27 @@ def batch_check(x, modes, params):
     assert type(out[0]).__name__ == 'ndarray'
 
 @use_np
-@pytest.mark.skip(reason='backward errors out')
 def test_ctc_loss():
-    A = np.ones((2, INT_OVERFLOW, 4))
+    def test_ctc_loss_size_check(A, label):
+        assertRaises(MXNetError, npx.ctc_loss, A, label)

Review comment:
       Right! I did not know changing the error message actually controls the error type. I have changed it to ValueError.




----------------------------------------------------------------
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:
users@infra.apache.org