Skip to content

Commit

Permalink
use new mxnet.gluon.block APIs (apache#18601)
Browse files Browse the repository at this point in the history
  • Loading branch information
RuRo authored and AntiZpvoh committed Jul 6, 2020
1 parent 414ec25 commit 6c96228
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/python/unittest/onnx/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_exports(self):
mx_op = mx_op(**attrs)
mx_op.initialize()
mx_op(mx.nd.zeros(input_shape))
params = {k: v.data() for k, v in mx_op.collect_params().items()}
params = {p.name: p.data() for p in mx_op.collect_params().values()}
outsym = mx_op(input_sym)
else:
params = {}
Expand Down Expand Up @@ -203,10 +203,9 @@ def test_exports(self):
("test_expand", "Expand", mx.sym.broadcast_to, (2,1,3,1), {'shape': (2,1,3,1)}),
("test_tile", "Tile", mx.sym.tile, (2,1,3,1), {'reps': (2,3)}),
("test_topk", "TopK", mx.sym.topk, (2, 10, 2), {'k': 3, 'axis': 1, 'ret_typ': 'both', 'dtype': np.int64}),
("test_slice_axis", "Slice", mx.sym.slice_axis, (2, 10, 2), {'begin': 3, 'end': 7, 'axis': 1})
# https://github.com/apache/incubator-mxnet/issues/18596
# ("test_LSTM", "LSTM", mx.gluon.rnn.LSTM, (3,1,2), {'hidden_size': 3}),
# ("test_BiLSTM", "LSTM", mx.gluon.rnn.LSTM, (3,1,2), {'hidden_size': 3, 'bidirectional': True}),
("test_slice_axis", "Slice", mx.sym.slice_axis, (2, 10, 2), {'begin': 3, 'end': 7, 'axis': 1}),
("test_LSTM", "LSTM", mx.gluon.rnn.LSTM, (3,1,2), {'hidden_size': 3}),
("test_BiLSTM", "LSTM", mx.gluon.rnn.LSTM, (3,1,2), {'hidden_size': 3, 'bidirectional': True}),
]

if __name__ == '__main__':
Expand Down

0 comments on commit 6c96228

Please sign in to comment.