Open neverUseThisName opened 4 years ago
Hi,thanks for your question. It should be noted that 'TripletLoss' here is asymmetric. The anchors only contains positive samples. After adding 'target = 1-target[:, 0]', 0 and 1 represent positive(real) and negative(fake) samples, respectively.
Hi,thanks for your question. It should be noted that 'TripletLoss' here is asymmetric. The anchors only contains positive samples. After adding 'target = 1-target[:, 0]', 0 and 1 represent positive(real) and negative(fake) samples, respectively.
hello but I notice in faceforensics.py you have changed the label if int(item[1]) == 0: pos_infos.append(dict( img_path=item[0], label=1 - int(item[1]))) else: neg_infos.append(dict( img_path=item[0], label=1 - int(item[1]))) if you use 'target = 1 - target[:, 0]' ,it will not use?
Hi, @silvercherry , sorry to confuse you, only when calculating the triplet loss, 0 represent positive(real).
Hi, @silvercherry , sorry to confuse you, only when calculating the triplet loss, 0 represent positive(real).
that means the real face groud truth is 1,when calculating the triplet loss it will be 0?
Hi, I have a hard time understanding code snippet in TripletLoss.py. What is the purpose of 'target = 1 - target[:, 0]'? Thanks.