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

以前和现在的 cosin_add_m scale 的实现区别是什么昵 #25

Open
shiyuanyin opened this issue May 13, 2019 · 2 comments
Open

Comments

@shiyuanyin
Copy link

以前的 层,是两个层,一个添加m角度,一个添加尺度64或者128
然后新的arcface合并只有一层, 没有scale 参数设置的值,但是这里和上面的实现的区别在哪里昵
layer {
name: "cosin_add_m"
type: "CosinAddm"
bottom: "temp_fc6"
bottom: "label"
top: "fc6_margin"
cosin_add_m_param {
m: 0.5
}
}
layer {
name: "fc6_margin_scale"
type: "Scale"
bottom: "fc6_margin"
top: "fc6_margin_scale"
param {
lr_mult: 0
decay_mult: 0
}
scale_param {
filler{
type: "constant"
value: 64
}
}

修改过后的addm 层
layer {
name: "adacos_add_m_scale"
type: "AdaCosAddmScale"
bottom: "fc6"
bottom: "label"
top: "fc6_margin_scale"
adacos_add_m_scale_param {
m: 0.5
num_classes: 10575
}
}

@xialuxi

@xialuxi
Copy link
Owner

xialuxi commented May 13, 2019

S值根据学习的参数自动调整

@borisgribkov
Copy link

Hi @xialuxi first of all thanks for your code, I found that ArcFace caffe version is very useful and now is looking at AdaCos. As it seems for me, your version and published version are a bit different. Paper authors removed M parameter and made S adjustable ( or it can be determined ). In your code S is also adjustable but M is still present. Could you please comment this?

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

3 participants