def _init_creiteron(self):
		self.ide_creiteron = CrossEntropyLabelSmooth(self.pid_num)
		self.triplet_creiteron = TripletLoss(self.margin, 'euclidean')
Example #2
0
 def _init_creterion(self):
     self.reconst_loss = nn.L1Loss()
     self.id_loss = nn.CrossEntropyLoss()
     self.ide_creiteron = CrossEntropyLabelSmooth(395)
     self.triplet_creiteron = TripletLoss(0.3, 'euclidean')
Example #3
0
 def _init_creiteron(self):
     self.ide_creiteron = CrossEntropyLabelSmooth(self.pid_num,
                                                  reduce=False)
     self.triplet_creiteron = TripletLoss(self.margin, 'euclidean')
     self.bce_loss = nn.BCELoss()
     self.permutation_loss = PermutationLoss()