Skip to content

Instantly share code, notes, and snippets.

@dmichael
Created November 13, 2011 18:11
Show Gist options
  • Select an option

  • Save dmichael/1362424 to your computer and use it in GitHub Desktop.

Select an option

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