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

Use new mxnet.gluon.blocks APIs for ONNX gluon tests #18601

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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