|
@@ -1,7 +1,19 @@
|
|
|
# Hold the network attributes
|
|
|
|
|
|
+import numpy as np
|
|
|
+
|
|
|
class Network():
|
|
|
- def __init__(self):
|
|
|
- # TODO
|
|
|
- print("Created")
|
|
|
+
|
|
|
+ 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.inputLength, self.hiddenLength))
|
|
|
+ self.bias2 = np.zeros(self.inputLength)
|
|
|
|