running
This commit is contained in:
9
brain.py
9
brain.py
@@ -14,9 +14,14 @@ class Neural_Network(object):
|
||||
self.fitness = 0
|
||||
|
||||
#weights
|
||||
if not W1 :
|
||||
if W1 is not None:
|
||||
self.W1=W1
|
||||
else :
|
||||
self.W1 = np.random.randn(self.inputSize, self.hiddenSize) # weights from input to hidden layer
|
||||
if not W2 :
|
||||
|
||||
if W2 is not None:
|
||||
self.W2=W2
|
||||
else :
|
||||
self.W2 = np.random.randn(self.hiddenSize, self.outputSize) # weights from hidden to output layer
|
||||
# self.w1 = [[random.random() for i in range(self.hiddenSize)] for i in range(self.inputSize)]
|
||||
# self.w2 = [[random.random() for i in range(self.outputSize)] for i in range(self.hiddenSize)]
|
||||
|
||||
Reference in New Issue
Block a user