Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ambuj Mehrish
sidekit
Commits
a8d9f3ed
Commit
a8d9f3ed
authored
Nov 01, 2020
by
Anthony Larcher
Browse files
arcface
parent
57295377
Changes
1
Hide whitespace changes
Inline
Side-by-side
nnet/loss.py
View file @
a8d9f3ed
...
...
@@ -91,10 +91,10 @@ def l2_norm(input,axis=1):
return
output
class
Arc
f
ace
(
torch
.
nn
.
Module
):
class
Arc
F
ace
(
torch
.
nn
.
Module
):
# implementation of additive margin softmax loss in https://arxiv.org/abs/1801.05599
def
__init__
(
self
,
embedding_size
,
classnum
,
s
=
64.
,
m
=
0.5
):
super
(
Arc
f
ace
,
self
).
__init__
()
super
(
Arc
F
ace
,
self
).
__init__
()
self
.
classnum
=
classnum
self
.
kernel
=
Parameter
(
torch
.
Tensor
(
embedding_size
,
classnum
))
# initial kernel
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment