Permalink
Browse files

Output changes

  • Loading branch information...
swvist committed Nov 13, 2011
1 parent 7375a92 commit 6fdaab80d21a09c16e3076ccdb0338c00a482c6b
Showing with 3 additions and 2 deletions.
  1. +3 −2 ocrn/neuralnet.py
View
@@ -26,12 +26,13 @@ def loadTrainingData(self, trainingdataset):
# Train the neural network 'n' times with loaded training data.
def teach(self, n):
for i in range (1, n+1):
- print self.trainer.train()
+ print str(i) + " : " + str(self.trainer.train())
# Activate the Neural Network with test data. Returns calculated output.
def activate(self, testdata):
if testdata.size == self.inputdimension:
- return self.nnet.acivate(testdata)
+ x = self.nnet.activate(testdata)
+ return int(round(x[0],0))
else:
print "Test data error\n"
return 0

0 comments on commit 6fdaab8

Please sign in to comment.