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

Feature Request: Add Mish activation #933

Closed
digantamisra98 opened this issue Nov 18, 2019 · 9 comments
Closed

Feature Request: Add Mish activation #933

digantamisra98 opened this issue Nov 18, 2019 · 9 comments

Comments

@digantamisra98
Copy link

Mish is a new novel activation function proposed in this paper.
It has shown promising results so far and has been adopted in several packages including:

All benchmarks, analysis and links to official package implementations can be found in this repository

It would be nice to have Mish as an option within the activation function group.

This is the comparison of Mish with other conventional activation functions in a SEResNet-50 for CIFAR-10:
se50_1

@dfalbel
Copy link
Member

dfalbel commented Nov 18, 2019

Hi! @digantamisra98 this is very interesting!

Do you want to contribute a Pull Request implementing it as a layer_activation_mish?

@digantamisra98
Copy link
Author

@dfalbel will need some help, still a novice in R. But if you can chime in and do a PR, that would be very helpful. Thanks

@dfalbel
Copy link
Member

dfalbel commented Nov 18, 2019

Ok! I'll leave it open as an enhancement. I have some other higher priority issues but will come back if I have time.

@digantamisra98
Copy link
Author

@dfalbel alright. Thanks for the consideration. Meanwhile I'll try to put up a PR

@amrrs
Copy link

amrrs commented Nov 20, 2019

@dfalbel I can give a try, Do you have any example PR to refer of what has to be changed in that case?

@digantamisra98
Copy link
Author

@dfalbel do you have any suggestion of how to integrate Mish from TensorFlow-Addons considering R Keras is using TF.Keras under the hood if I'm correct?

@dfalbel
Copy link
Member

dfalbel commented Nov 20, 2019

@digantamisra98 you can check if the module is installed and load it or return an error otherwise. for example:

if (reticulate::py_module_available("tfaddons")) {
  tfaddon <- reticulate::import("tfaddon")
} else {
  stop("Needs tfaddon. Please install with `reticulate::py_install('tfaddon')`")
}

Then you can just use the tfaddon.

@amrrs the closes PR I found is this: https://github.com/rstudio/keras/pull/838/files#diff-7089c0b7d945592843f01e094a15f211R35

I ended up moving this to a different package, but the idea is the same.

@arunamalla
Copy link

@dfalbel is this still an issue? I would like to implement if it is.

@t-kalinowski
Copy link
Member

keras3::activation_mish() is available. Please give it a try:

remotes::install_github("rstudio/keras")
library(keras3)

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

No branches or pull requests

5 participants