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

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Jun 26, 2019
1 parent c35c18a commit 61ba9e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/python/unittest/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8660,11 +8660,18 @@ def test_get_all_registered_operators():
ops = get_all_registered_operators()
ok_(isinstance(ops, list))
ok_(len(ops) > 0)
ok_('Activation' in ops)


def test_get_operator_arguments():
operator_arguments = get_operator_arguments(mx.operator.get_all_registered_operators()[0])
operator_arguments = get_operator_arguments('Activation')
ok_(isinstance(operator_arguments, OperatorArguments))
ok_(operator_arguments.names == ['data', 'act_type'])
print(operator_arguments.types)
ok_(operator_arguments.types
== ['NDArray-or-Symbol', "{'relu', 'sigmoid', 'softrelu', 'softsign', 'tanh'}, required"])
ok_(operator_arguments.narg == 2)



if __name__ == '__main__':
Expand Down

0 comments on commit 61ba9e5

Please sign in to comment.