Skip to content

Instantly share code, notes, and snippets.

@spolu
Created September 22, 2014 23:41
Show Gist options
  • Save spolu/a83d8bff58ddcd4045fa to your computer and use it in GitHub Desktop.
Save spolu/a83d8bff58ddcd4045fa to your computer and use it in GitHub Desktop.
NN activation function
for(int j = 0; j < layers_[l-1]; j++) {
sum_[l][i] += W_[l][i][j] * val_[l-1][j];
}
/* Activation function */
val_[l][i] = 1 / (1 + exp(-sum_[l][i]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment