Skip to content

Instantly share code, notes, and snippets.

@ashwani-rathee
Last active October 31, 2020 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwani-rathee/a4e9e2c441b83f4fd298ea1d4af22819 to your computer and use it in GitHub Desktop.
Save ashwani-rathee/a4e9e2c441b83f4fd298ea1d4af22819 to your computer and use it in GitHub Desktop.
"""
Sigmoid activation function
"""
function sigmoid(Z)
A = 1 ./ (1 .+ exp.(.-Z))
return (A = A, Z = Z)
end
"""
ReLU activation function
"""
function relu(Z)
A = max.(0, Z)
return (A = A, Z = Z)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment