Last active
May 21, 2020 21:35
-
-
Save akarsh-saxena/37090ffe07e2a8e046b425e22aee318f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def sigmoid(Z): | |
"""Applies sigmoid function to an array/value | |
Arguments | |
--------- | |
Z: float/int/array_like | |
Original Value | |
Returns | |
------- | |
A: same shape as input | |
Value after applying sigmoid function | |
""" | |
return 1/(1+np.power(np.e, -Z)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment