Skip to content

Instantly share code, notes, and snippets.

@PyDataBlog
Created August 29, 2020 14:57
Show Gist options
  • Select an option

  • Save PyDataBlog/f6787de72587235de7303eeb6e95677e to your computer and use it in GitHub Desktop.

Select an option

Save PyDataBlog/f6787de72587235de7303eeb6e95677e 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