Skip to content
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

Merged
merged 2 commits into from
Jul 25, 2018

Conversation

siju-samuel
Copy link
Member

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.

@siju-samuel
Copy link
Member Author

siju-samuel commented Jul 24, 2018

@PariksheetPinjari909 @srkreddy1238 Could you please help review this PR. Thanks

@@ -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)))
Copy link
Contributor

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'''
Copy link
Contributor

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

@siju-samuel
Copy link
Member Author

@PariksheetPinjari909 Thanks for reviewing. I modified according to your comments. Please check.

Copy link
Contributor

@PariksheetPinjari909 PariksheetPinjari909 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tqchen tqchen merged commit c24448f into apache:master Jul 25, 2018
@tqchen
Copy link
Member

tqchen commented Jul 25, 2018

Thanks @siju-samuel @PariksheetPinjari909 ! this is now merged

tqchen pushed a commit to tqchen/tvm that referenced this pull request Aug 4, 2018
sergei-mironov pushed a commit to sergei-mironov/tvm that referenced this pull request Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants