def save_best_model(self, accuracy, file_path, num_to_keep=1):
     # TODO save the model if it is the best
     if accuracy > BodyStatsNet.bestacc:
       pt_util.save(self, file_path, num_to_keep)
Exemple #2
0
 def save_best_model(self, error, file_path, num_to_keep=1):
     if error < self.lowest_error:
         self.lowest_error = error
         pt_util.save(self, file_path, num_to_keep)
 def save_model(self, file_path, num_to_keep=1):
     pt_util.save(self, file_path, num_to_keep)
    def save_best_model(self, accuracy, file_path, num_to_keep=1):
        global best_acc1

        if (accuracy > best_acc1):
            best_acc1 = accuracy
            pt_util.save(self, file_path, num_to_keep)