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
849 stars 128 forks source link

CosNormClassifier#L24 #5

Closed sudabai666 closed 5 years ago

sudabai666 commented 5 years ago

Hi, Thank you for releasing the code for your paper. I'm a little confused when I look at this line of code. https://github.com/zhmiao/OpenLongTailRecognition-OLTR/models/CosNormClassifier.py#L24. It seems to be different from what is described in the paper. Could you help me with this problem?

Thank you very much.

zhmiao commented 5 years ago

Hello @sudabai666 Thank you for asking. Could you please be a little more specific on which part you are having a problem with? Thanks again.

zhmiao commented 5 years ago

Since it has been more than 20 days, we will close this issue by now. If you are having more questions, we will open it again. Thank you very much!

drcege commented 5 years ago

I guess he meant Eq.(6).

Should be ex = (norm_x**2 / (1 + norm_x**2)) * (input / norm_x) instead of
ex = (norm_x / (1 + norm_x)) * (input / norm_x).

zhmiao commented 5 years ago

@drcege and @sudabai666 Thanks for asking. As in issue #14 actually it was a typo in the paper. However, we have tried both ways for the normalization, with and without squares, it worked almost the same. You are welcomed to test it out as well. We will fix it in the text as soon as possible!

milliema commented 3 years ago

@zhmiao I find it's confused to use reachability and CosNormClassifier. Since the feature will be normalized in CosNormClassifier, why bother scaling it with reachability?