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
add selu activation function #10889
add selu activation function #10889
Conversation
@@ -1553,6 +1553,14 @@ void TFImporter::populateNet(Net dstNet) | |||
layer_id[name] = id; | |||
connectToAllBlobs(layer_id, dstNet, parsePin(layer.input(0)), id, layer.input_size()); | |||
} | |||
else if (type == "Selu") | |||
{ | |||
layerParams.set("scale", 1.0507009873554804934193349852946f); |
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.
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.
I have put a link to the paper in the linked issue. Here it is again: https://arxiv.org/abs/1706.02515
|
Sure, no problem.
|
Please look at custom layers registration: https://docs.opencv.org/master/dc/db1/tutorial_dnn_custom_layers.html. |
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. |
resolves #10888
This pullrequest changes
I have not yet added the test data and request the devs to guide me on how to do it.