Example #1
0
 def ver_test(nbatch):
     results = []
     # for i in xrange(len(ver_list)):
     for i in range(len(ver_list)):
         acc1, std1, acc2, std2, xnorm, embeddings_list = verification.test(
             ver_list[i], model, args.batch_size, 10, None, label_shape)
         print('[%s][%d]XNorm: %f' % (ver_name_list[i], nbatch, xnorm))
         #print('[%s][%d]Accuracy: %1.5f+-%1.5f' % (ver_name_list[i], nbatch, acc1, std1))
         print('[%s][%d]Accuracy-Flip: %1.5f+-%1.5f' %
               (ver_name_list[i], nbatch, acc2, std2))
         results.append(acc2)
     return results
 def ver_test(self, backbone: torch.nn.Module, global_step: int):
     results = []
     for i in range(len(self.ver_list)):
         acc1, std1, acc2, std2, xnorm, embeddings_list = verification.test(
             self.ver_list[i], backbone, 10, 10)
         logging.info('[%s][%d]XNorm: %f' % (self.ver_name_list[i], global_step, xnorm))
         logging.info('[%s][%d]Accuracy-Flip: %1.5f+-%1.5f' % (self.ver_name_list[i], global_step, acc2, std2))
         if acc2 > self.highest_acc_list[i]:
             self.highest_acc_list[i] = acc2
         logging.info(
             '[%s][%d]Accuracy-Highest: %1.5f' % (self.ver_name_list[i], global_step, self.highest_acc_list[i]))
         results.append(acc2)
Example #3
0
 def ver_test(self, num_update):
     results = []
     for i in range(len(self.ver_list)):
         acc1, std1, acc2, std2, xnorm, embeddings_list = verification.test(
             self.ver_list[i], self.model, 10, 10, None, None)
         logging.info('[%s][%d]XNorm: %f' %
                      (self.ver_name_list[i], num_update, xnorm))
         logging.info('[%s][%d]Accuracy-Flip: %1.5f+-%1.5f' %
                      (self.ver_name_list[i], num_update, acc2, std2))
         if acc2 > self.highest_acc_list[i]:
             self.highest_acc_list[i] = acc2
         logging.info(
             '[%s][%d]Accuracy-Highest: %1.5f' %
             (self.ver_name_list[i], num_update, self.highest_acc_list[i]))
         results.append(acc2)