Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Output changes

  • Loading branch information...
commit 6fdaab80d21a09c16e3076ccdb0338c00a482c6b 1 parent 7375a92
@swvist authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 ocrn/neuralnet.py
View
5 ocrn/neuralnet.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.