Last active
January 21, 2017 00:28
-
-
Save ugik/02d9b7b6ec5fcdb213d3f02551c6f051 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
class NeuralNetwork(): | |
def __init__(self): | |
# Seed the random number generator, so it generates the same numbers | |
# every time the program runs. | |
random.seed(1) | |
# We model a single neuron, with 3 input connections and 1 output connection. | |
# We assign random weights to a 3 x 1 matrix, with values in the range -1 to 1 | |
# and mean 0. | |
self.synaptic_weights = 2 * random.random((3, 1)) - 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment