-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NNVM][DARKNET]Logistic activation added #1477
Conversation
@PariksheetPinjari909 @srkreddy1238 Could you please help review this PR. Thanks |
nnvm/python/nnvm/frontend/darknet.py
Outdated
@@ -323,6 +325,8 @@ def _darknet_activations(inputs, attrs): | |||
sym = _darknet_get_nnvm_op(op_name)(*inputs, **new_attrs) | |||
elif act_type in ['elu']: | |||
sym = -1 * _sym.relu(1 - _sym.exp(*inputs)) + _sym.relu(*inputs) | |||
elif act_type in ['logistic']: | |||
sym = 1 / (1 + _sym.exp(*inputs * (-1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_sym.sigmoid function can be used here.
@@ -324,6 +324,32 @@ def test_forward_rnn(): | |||
test_rnn_forward(net) | |||
LIB.free_network(net) | |||
|
|||
def test_forward_activation_logistic(): | |||
'''test elu activation layer''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls correct comment elu to logistic activation
e3e7489
to
47922d3
Compare
@PariksheetPinjari909 Thanks for reviewing. I modified according to your comments. Please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @siju-samuel @PariksheetPinjari909 ! this is now merged |
Logistic activation support is added for darknet, which is needed for a C-RNN model.
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from others in the community.