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
Anthony Larcher
sidekit
Commits
bca82ed4
Commit
bca82ed4
authored
Apr 21, 2021
by
Anthony Larcher
Browse files
debug aam
parent
0946c781
Changes
2
Show whitespace changes
Inline
Side-by-side
nnet/loss.py
View file @
bca82ed4
...
...
@@ -282,7 +282,7 @@ class ArcMarginProduct(torch.nn.Module):
output
=
(
one_hot
*
phi
)
+
((
1.0
-
one_hot
)
*
cosine
)
output
=
output
*
self
.
s
return
output
return
output
,
cosine
*
self
.
s
class
SoftmaxAngularProto
(
torch
.
nn
.
Module
):
...
...
nnet/xvector.py
View file @
bca82ed4
...
...
@@ -1342,6 +1342,7 @@ def xtrain(dataset_description,
torch
.
backends
.
cudnn
.
deterministic
=
True
# Set all the seeds
random
.
seed
(
training_opts
[
"random_seed"
])
numpy
.
random
.
seed
(
training_opts
[
"numpy_seed"
])
# Set the random seed of numpy for the data split.
torch
.
manual_seed
(
training_opts
[
"torch_seed"
])
torch
.
cuda
.
manual_seed
(
training_opts
[
"torch_seed"
])
...
...
@@ -1521,6 +1522,7 @@ def train_epoch(model,
accuracy
=
0.0
running_loss
=
0.0
batch_count
=
0
for
batch_idx
,
(
data
,
target
)
in
enumerate
(
training_loader
):
data
=
data
.
squeeze
().
to
(
device
)
...
...
Write
Preview
Markdown
is supported
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