Skip to content

Instantly share code, notes, and snippets.

@hoogenm
Last active June 30, 2018 08:25
Show Gist options
  • Select an option

  • Save hoogenm/d9f7c2e596d38974f3ee1a227fc6ae72 to your computer and use it in GitHub Desktop.

Select an option

Save hoogenm/d9f7c2e596d38974f3ee1a227fc6ae72 to your computer and use it in GitHub Desktop.
Swish ANN Activation Function (for Keras)
import keras
keras.utils.generic_utils.get_custom_objects().update({'swish': keras.layers.Activation(lambda x: keras.backend.sigmoid(x) * x)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment