Skip to content

add selu activation function#10889

Closed
lakshayg wants to merge 1 commit intoopencv:3.4from
lakshayg:selu
Closed

add selu activation function#10889
lakshayg wants to merge 1 commit intoopencv:3.4from
lakshayg:selu

Conversation

@lakshayg
Copy link
Copy Markdown

resolves #10888

This pullrequest changes

  • adds the selu activation function

I have not yet added the test data and request the devs to guide me on how to do it.

@dkurt dkurt self-assigned this Feb 17, 2018
}
else if (type == "Selu")
{
layerParams.set("scale", 1.0507009873554804934193349852946f);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please provide an origin of these magic values? Are they results of some optimization problem that we can reproduce locally or they are just some irrational numbers that have too complicated formula? This way it'd be nice to put a reference to a some proof that they are optimal.

@lakshayg
Copy link
Copy Markdown
Author

lakshayg commented Feb 27, 2018 via email

@dkurt
Copy link
Copy Markdown
Member

dkurt commented Mar 21, 2018

@lakshayg, thank you for your contribution! Unfortunately, I did not find any strong proofs why this activation is so useful. I think we can add this layer later, when it'll be more popular. For now you can test custom layers creation from PR #11129.

@lakshayg
Copy link
Copy Markdown
Author

lakshayg commented Mar 22, 2018 via email

@dkurt
Copy link
Copy Markdown
Member

dkurt commented Apr 25, 2018

Please look at custom layers registration: https://docs.opencv.org/master/dc/db1/tutorial_dnn_custom_layers.html.

@dkurt dkurt closed this Apr 25, 2018
@AlvarHHM
Copy link
Copy Markdown

AlvarHHM commented Oct 4, 2018

@lakshayg, thank you for your contribution! Unfortunately, I did not find any strong proofs why this activation is so useful. I think we can add this layer later, when it'll be more popular. For now you can test custom layers creation from PR #11129.

Both pytorch, keras and tensorflow has native support for SELU, which is a strong evident that this activation layer should be popular enough for opencv to support it.

P.S. I would be grateful if someone can provide a custom layer implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants