Skip to content

Instantly share code, notes, and snippets.

@mini-ninja-64
Created March 19, 2017 13:50
Show Gist options
  • Save mini-ninja-64/1ff54f628a806b270b71b9fc51d5e297 to your computer and use it in GitHub Desktop.
Save mini-ninja-64/1ff54f628a806b270b71b9fc51d5e297 to your computer and use it in GitHub Desktop.
sigmoid functions
float activate(float x)
{
return 1.0/(1.0+exp(-x));
}
float activateDerivative(float x)
{
return activate(x)*(1.0 - activate(x));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment