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

Commit

Permalink
Add assert to test reset_ctx
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Panev <[email protected]>
  • Loading branch information
Kh4L committed Sep 17, 2019
1 parent abc5b91 commit 17051dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/python/unittest/test_gluon.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def test_parameter_dict():
params3.initialize(ctx=ctx)
list_contexts = [mx.cpu(42), mx.cpu(24)]
params3.reset_ctx(list_contexts)
for p in params3.values():
assert set(p.list_ctx()) == set(list_contexts)

# and test list_ctx
assert set(params3.list_ctx()) == set(list_contexts)

Expand Down

0 comments on commit 17051dd

Please sign in to comment.