12345678910111213141516171819202122 |
- # Store a neuronal network
- import numpy as np
- class Network():
- """
- Structure holding neural network attributes
- """
- def __init__(self, activationFunction, activationDerivative):
- self.inputLength = 784
- self.hiddenLength = 30
- self.outputLength = 10
- self.activationFunction = activationFunction
- self.activationDerivative = activationDerivative
- self.layer1 = np.zeros((self.hiddenLength, self.inputLength))
- self.bias1 = np.zeros(self.hiddenLength)
- self.layer2 = np.zeros((self.outputLength, self.hiddenLength))
- self.bias2 = np.zeros(self.outputLength)
|