Skip to content

Instantly share code, notes, and snippets.

@Mehdi-Amine
Last active April 25, 2020 14:15
Show Gist options
  • Save Mehdi-Amine/0ccd7bc2f565ef9ad1da2ed82d3d1d63 to your computer and use it in GitHub Desktop.
Save Mehdi-Amine/0ccd7bc2f565ef9ad1da2ed82d3d1d63 to your computer and use it in GitHub Desktop.
sigmoid function and feedforward algorithm
def sigmoid(z):
return 1.0 / (1.0 + np.exp(-z))
z = numpy.dot(weights, instance) + bias.squeeze()
a = sigmoid(z)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment