Skip to content

Commit

Permalink
Update NeuralNet_2_0.py (microsoft#522)
Browse files Browse the repository at this point in the history
Fixed accuracy not returned in Test method.
  • Loading branch information
fancy-mit-cse authored Jul 31, 2020
1 parent d480508 commit dfe03a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def Test(self, dataReader):
x,y = dataReader.GetTestSet()
self.forward(x)
correct = self.__CalAccuracy(self.output, y)
print(correct)
return correct

def __CalAccuracy(self, a, y):
assert(a.shape == y.shape)
Expand Down Expand Up @@ -181,4 +181,4 @@ def ShowTrainingHistory(self):
self.loss_trace.ShowLossHistory(self.hp)

def GetTrainingHistory(self):
return self.loss_trace
return self.loss_trace

0 comments on commit dfe03a1

Please sign in to comment.