Académique Documents
Professionnel Documents
Culture Documents
py at master · jonasbostoen/simple-neural-network
import numpy as np
# input dataset
training_inputs = np.array([[0,0,1],
[1,1,1],
ddxσ(x)=σ(x)(1−σ(x))
[1,0,1],
[0,1,1]])
# output dataset
training_outputs = np.array([[0,1,1,0]]).T
# initialize weights randomly with mean 0 to create weight matrix, synaptic weights
synaptic_weights = 2 * np.random.random((3,1)) - 1
# update weights
synaptic_weights += np.dot(input_layer.T, adjustments)
https://github.com/jonasbostoen/simple-neural-network/blob/master/training_version.py#L1 1/1