Skip to content

Commit

Permalink
print confusion option is true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragav Venkatesan (Student) authored and Ragav Venkatesan (Student) committed Mar 17, 2017
1 parent 9014a1d commit 8bc296a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions yann/modules/resultor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class resultor(module):
"learning_rate" : "<learning_rate_file_name>.txt"
"momentum" : <momentum_file_name>.txt
"visualize" : <bool>
"print_confusion" : <bool>
"save_confusion" : <bool>
"id" : id of the resultor
}
Expand Down Expand Up @@ -70,8 +70,8 @@ def __init__( self, resultor_init_args, verbose = 1):
if not "viualize" in resultor_init_args.keys():
resultor_init_args["visualize"] = True

if not"print_confusion" in resultor_init_args.keys():
resultor_init_args["print_confusion"] = True
if not"save_confusion" in resultor_init_args.keys():
resultor_init_args["save_confusion"] = True

for item, value in resultor_init_args.iteritems():
if item == "root":
Expand All @@ -88,8 +88,8 @@ def __init__( self, resultor_init_args, verbose = 1):
self.learning_rate = value
elif item == "momentum":
self.momentum = value
elif item == "print_confusion":
self.print_confusion = value
elif item == "save_confusion":
self.save_confusion = value


if not hasattr(self, 'root'): raise Exception('root variable has not been provided. \
Expand Down Expand Up @@ -165,7 +165,7 @@ def print_confusion (self, epoch=0, train = None, valid = None, test = None, ver
test: testing confusion matrix as gained by the test method.
verbose: As usual.
"""
if self.print_confusion is True:
if self.save_confusion is True:

if verbose >=3:
print ("... Printing confusion matrix")
Expand Down

0 comments on commit 8bc296a

Please sign in to comment.