Skip to content

Instantly share code, notes, and snippets.

@Mehdi-Amine
Last active April 26, 2020 15:54
Show Gist options
  • Save Mehdi-Amine/7032ccfd615eca0e4752e572a4db852c to your computer and use it in GitHub Desktop.
Save Mehdi-Amine/7032ccfd615eca0e4752e572a4db852c to your computer and use it in GitHub Desktop.
perceptron = Perceptron(2) # two layers: input and output
perceptron.sgd(training_data=training_data, mini_batch_size=80, epochs=800, eta=0.01)
'''
Out:
Generated Perceptron:
Sizes: [2, 1]
With random parameters:
Bias: [[0.49671415]]
Weights: [[-0.1382643 0.64768854]]
-------------------------------------------------------------
Optimized Parameters:
Bias: [[0.00018476]]
Weights: [[1.00000451 0.50000286]]
-------------------------------------------------------------
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment