Skip to content

Instantly share code, notes, and snippets.

@dmichael
Created November 13, 2011 18:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmichael/1362424 to your computer and use it in GitHub Desktop.
Save dmichael/1362424 to your computer and use it in GitHub Desktop.
Sigmoid Gradient
function g = sigmoid(z)
g = sigmoid = 1.0 ./ (1.0 + exp(-z));
end
function g = sigmoidGradient(z)
g = sigmoid(z) .* (1 - sigmoid(z));
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment