def _init_creiteron(self): self.ide_creiteron = CrossEntropyLabelSmooth(self.pid_num) self.triplet_creiteron = TripletLoss(self.margin, 'euclidean')
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')
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()