tjddus9597 / Proxy-Anchor-CVPR2020

Official PyTorch Implementation of Proxy Anchor Loss for Deep Metric Learning, CVPR 2020
MIT License
314 stars 60 forks source link

[bug] proxyNCA loss also has parameters that needs to optimized #25

Closed jdhao closed 2 years ago

jdhao commented 2 years ago

proxyNCA loss is also used here to compare with proxy anchor loss.

According to doc of proxyNCA loss, this loss have parameters that need optimization:

This loss requires an optimizer. You need to create an optimizer and pass this loss's parameters to that optimizer.

However, in your code, you only optimize the parameters of the proposed proxy anchor loss, as shown here.

Are there any hidden reasons untold or just an oversight?

tjddus9597 commented 2 years ago

Thanks for pointing out a helpful issue. When releasing this code, we replaced the original implementation code with pytorch-metric-learning library for simplicity. At that time, it seems that I accidentally omitted the part of optimizing parameters (i.e., proxy) of proxy-NCA. I note that the parameters of proxy-NCA are optimized when we conducted experimentation of proxy-NCA (e.g., Fig. 1). Thanks again, and I will correct that code soon. :D

jdhao commented 2 years ago

@tjddus9597 Thanks for the prompt reply!

BTW, can you review my PR https://github.com/tjddus9597/Proxy-Anchor-CVPR2020/pull/24 here? 😃

tjddus9597 commented 2 years ago

I've been very busy lately, so I haven't been able to check the repository. I am sorry for that. I will check it right away and reflect that PR. :)