Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix test (#20191)
Browse files Browse the repository at this point in the history
Co-authored-by: Wei Chu <[email protected]>
  • Loading branch information
waytrue17 and Wei Chu committed Apr 20, 2021
1 parent 16d1da9 commit 83f697b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10041,10 +10041,7 @@ def test_scalarop_locale_invariance():
finally:
locale.setlocale(locale.LC_NUMERIC, prev)

if __name__ == '__main__':
import nose
nose.runmodule()

@with_seed()
def test_take_grads():
# Test for https://github.com/apache/incubator-mxnet/issues/19817
from mxnet.gluon.nn import HybridBlock, Conv1D, HybridSequential, HybridLambda, Dense
Expand Down Expand Up @@ -10133,4 +10130,8 @@ def hybrid_forward(self, F, X, axis=-1):
grads2 = run_model(model2, loss, X, Y)

for i in range(len(grads1)):
assert_almost_equal(grads1[i], grads2[i])
assert_almost_equal(grads1[i], grads2[i])

if __name__ == '__main__':
import nose
nose.runmodule()

0 comments on commit 83f697b

Please sign in to comment.