zhmiao / OpenLongTailRecognition-OLTR

Pytorch implementation for "Large-Scale Long-Tailed Recognition in an Open World" (CVPR 2019 ORAL)
BSD 3-Clause "New" or "Revised" License
841 stars 128 forks source link

Some errors in equation (7) #19

Closed jchhuang closed 5 years ago

jchhuang commented 5 years ago

I think the vn(meta) in equation(7) is wrong, otherwise, the networks of concept selector, Hallucinator will not be trained

zhmiao commented 5 years ago

Hello @jchhuang , thank you very much for the reply. Could you please be a little bit more specific on where do you think is having problems?

jchhuang commented 5 years ago

In equation(7), both the input to the two parts of loss function is vn(meta), I think it is wrong.

zhmiao commented 5 years ago

@jchhuang Actually it is correct. The cross entropy loss and large margin loss should both be applied on to the output from the meta embedding. Because we use meta embedding to do the final classification. About your problem of training, as long as the losses are calculated with hallucinator based on the outputs of hallucinator, in pytorch, they will be updated using loss.step().

jchhuang commented 5 years ago

In my opinion, there is no directly relationship between centroid and vmeta, so I think it is inappropriate to express the second part as lamda* LLm(vnmeta, {ci}). I think the vnmeta here should be replaced by vdirect.

zhmiao commented 5 years ago

Actually that is not right, the input of center loss is processed meta embedding. In the code it more clear: https://github.com/zhmiao/OpenLongTailRecognition-OLTR/blob/master/run_networks.py#L162 We are learning centerloss regularized metric on the final meta embedding space. The centers were only initialized using direct embedding in the beginning of stage 2.

jchhuang commented 5 years ago

Thanks for your reply. I will reconsider this issue. thanks again

zhmiao commented 5 years ago

No problem. I will close this issue for now. Thanks.

jchhuang commented 5 years ago

I have a question:the ci in equation (9) is the centroid of vdirect or vmeta? Since only the centroid of vdirect is mentioned in the paper, so I think the computation of distance of centroid and vmeta do not make sense.

zhmiao commented 5 years ago

Like what I mentioned before, the centroids were only initialized using vdirect. After that the centroids are calculated using vmeta. So the equation (9) is also correct.