Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the easy_margin option #22

Closed
fengshikun opened this issue Jan 29, 2018 · 3 comments
Closed

Questions about the easy_margin option #22

fengshikun opened this issue Jan 29, 2018 · 3 comments

Comments

@fengshikun
Copy link

Thanks for your amazing work! After reading your paper and some code in this project, i have some questions:

  1. What's the meaning of option easy_margin?
    if args.easy_margin:
      cond = mx.symbol.Activation(data=cos_t, act_type='relu')
      #cond_v = cos_t - 0.4
      #cond = mx.symbol.Activation(data=cond_v, act_type='relu')
    else:
      cond_v = cos_t - threshold
      cond = mx.symbol.Activation(data=cond_v, act_type='relu')
  1. Why do relu activation on cos_t, will it let the minus value in fc7 not use amsoftmax's margin to do finnal softmax loss computing?
@nttstar
Copy link
Collaborator

nttstar commented Jan 29, 2018

'easy_margin' means we just add margin on the subset of "WX>0". It works but the defined formula is not monotone decreasing anymore.
'relu' here can be thought of 'if-else' condition.

@nttstar nttstar closed this as completed Feb 1, 2018
@hustzeyu
Copy link

What are the advantages of "easy-margin"? @nttstar @fengshikun

@BrettLL
Copy link

BrettLL commented Dec 26, 2018

hi,@nttstar , when I set easy_margin=false, what does "zy_keep = zy - smm" mean? According to my understandings, it means "zy_keep = scos(theta)-smsin(m)". however, I can not understand m*sin(m), waiting for your reply~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants