Open huangpen opened 3 years ago
I believe that you want anchor image feature to embed farther than positive and negative embedding since positive and negative samples are the same clothing type. However, in your code you wrote
disti_p = F.pairwise_distance(general_y, general_z, 2) disti_n1 = F.pairwise_distance(general_y, general_x, 2) disti_n2 = F.pairwise_distance(general_z, general_x, 2) loss_sim_i1 = self.criterion(disti_p, disti_n1, target) loss_sim_i2 = self.criterion(disti_p, disti_n2, target)
where general_x, general_y, general_z are representing anchor, negative, and positive data respectively. I think it should instead be
loss_sim_i1 = self.criterion(disti_n1, disti_p, target) loss_sim_i2 = self.criterion(disti_n2, disti_p, target)
Am I missing something?
I believe that you want anchor image feature to embed farther than positive and negative embedding since positive and negative samples are the same clothing type. However, in your code you wrote
where general_x, general_y, general_z are representing anchor, negative, and positive data respectively. I think it should instead be
Am I missing something?