Browse Source

Implement testing sample loading

DricomDragon 5 years ago
parent
commit
95195658a1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      python/lab/trainer.py

+ 4 - 4
python/lab/trainer.py

@@ -25,14 +25,14 @@ def train(inputNetwork, learnRate, epochs, batchSize = 10):
 	w1 = net.layer1 # reference
 	b1 =  np.stack([net.bias1] * batchSize).transpose() # stack
 
-	z1 = np.empty(net.hiddenLength, batchSize)
-	a1 = np.empty(net.hiddenLength, batchSize) 
+	z1 = np.empty((net.hiddenLength, batchSize))
+	a1 = np.empty((net.hiddenLength, batchSize))
 
 	w2 = net.layer2 # reference
 	b2 = np.stack([net.bias2] * batchSize).transpose() # stack
 
-	z2 = np.empty(net.outputLength, batchSize)
-	a2 = np.empty(net.outputLength, batchSize) 
+	z2 = np.empty((net.outputLength, batchSize))
+	a2 = np.empty((net.outputLength, batchSize))
 	
 	y = np.empty((net.outputLength, batchSize))