hh23333 / PVPM

PyTorch code for CVPR'2020 paper “Pose-guided Visible Part Matching for Occluded Person ReID”
112 stars 26 forks source link

thank you very much. But why the graph matching loss is negative and it works? Why does it and the positive loss item add up to the network? And why is the graph matching loss bigger than the positive one, and the combined loss is negative? #16

Closed lhc11171552 closed 3 years ago

hh23333 commented 3 years ago

We aim to maximize the graph matching object function, but optimizer in pytorch default to minimize the loss function, such that we negative the original object function. Two loss terms have different goals, It doesn't matter for which one is bigger.

lhc11171552 commented 3 years ago

Special thanks, I also want to ask whether the graph matching here is the local feature generated by the human mask multiplied by the feature map or the pose information of the human body? Because the total loss is added up and propagated back in the network, then the total loss is plus and minus added,and the overall negative will have a negative impact on the performance of the network?

hh23333 commented 3 years ago
  1. human mask multiplied by the feature map
  2. when backpropagation, negative the object function only change the direction of the gradient, which is what we want, maximize-->minimize. And the two items of the addition operation are independent during backpropagation.
lhc11171552 commented 3 years ago

thank you very much

lhc11171552 commented 3 years ago

Thanks for helping me