Skip to content
GitLab
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
c4f99b0a
Commit
c4f99b0a
authored
Mar 31, 2021
by
Anthony Larcher
Browse files
debug
parent
f2de4f4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
nnet/augmentation.py
View file @
c4f99b0a
...
...
@@ -169,6 +169,7 @@ class AddNoise(object):
noises
=
[]
left
=
original_duration
while
left
>
0
:
# select noise file at random
file
=
random
.
choice
(
self
.
noises
)
...
...
nnet/xvector.py
View file @
c4f99b0a
...
...
@@ -1225,7 +1225,7 @@ def cross_validation(model, validation_loader, device, validation_shape, mask, m
accuracy
+=
(
torch
.
argmax
(
batch_predictions
.
data
,
1
)
==
target
).
sum
()
loss
+=
criterion
(
batch_predictions
,
target
)
embeddings
[
batch_idx
*
batch_size
:
batch_idx
*
batch_size
+
batch_predictions
.
shape
[
0
],:]
=
batch_embeddings
.
detach
().
cpu
()
#
classes[batch_idx * batch_size:batch_idx * batch_size + batch_predictions.shape[0]] = target.detach().cpu()
classes
[
batch_idx
*
batch_size
:
batch_idx
*
batch_size
+
batch_predictions
.
shape
[
0
]]
=
target
.
detach
().
cpu
()
#print(classes.shape[0])
local_device
=
"cpu"
if
embeddings
.
shape
[
0
]
>
3e4
else
device
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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