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
28205f33
Commit
28205f33
authored
Apr 13, 2021
by
Anthony Larcher
Browse files
merge and sidesampler
parent
c11e4144
Changes
3
Show whitespace changes
Inline
Side-by-side
nnet/preprocessor.py
View file @
28205f33
...
@@ -211,6 +211,7 @@ class MelSpecFrontEnd(torch.nn.Module):
...
@@ -211,6 +211,7 @@ class MelSpecFrontEnd(torch.nn.Module):
"""
"""
:param x:
:param x:
:param is_eval:
:return:
:return:
"""
"""
with
torch
.
no_grad
():
with
torch
.
no_grad
():
...
...
nnet/xsets.py
View file @
28205f33
...
@@ -154,7 +154,7 @@ class SideSampler(torch.utils.data.Sampler):
...
@@ -154,7 +154,7 @@ class SideSampler(torch.utils.data.Sampler):
return
iter
(
self
.
index_iterator
)
return
iter
(
self
.
index_iterator
)
def
__len__
(
self
)
->
int
:
def
__len__
(
self
)
->
int
:
return
(
self
.
samples_per_speaker
*
self
.
spk_count
*
self
.
examples_per_speaker
)
//
self
.
num_replicas
return
(
self
.
samples_per_speaker
*
self
.
spk_count
*
self
.
examples_per_speaker
*
self
.
num_replicas
)
//
self
.
num_process
def
set_epoch
(
self
,
epoch
:
int
)
->
None
:
def
set_epoch
(
self
,
epoch
:
int
)
->
None
:
self
.
epoch
=
epoch
self
.
epoch
=
epoch
...
...
nnet/xvector.py
View file @
28205f33
...
@@ -863,9 +863,9 @@ def update_training_dictionary(dataset_description,
...
@@ -863,9 +863,9 @@ def update_training_dictionary(dataset_description,
dataset_opts
[
"batch_size"
]
=
64
dataset_opts
[
"batch_size"
]
=
64
dataset_opts
[
"train"
]
=
dict
()
dataset_opts
[
"train"
]
=
dict
()
dataset_opts
[
"train"
][
"duration"
]
=
2
.
dataset_opts
[
"train"
][
"duration"
]
=
4
.
dataset_opts
[
"train"
][
"chunk_per_segment"
]
=
-
1
dataset_opts
[
"train"
][
"chunk_per_segment"
]
=
-
1
dataset_opts
[
"train"
][
"overlap"
]
=
1
.9
dataset_opts
[
"train"
][
"overlap"
]
=
3
.9
dataset_opts
[
"train"
][
"sampler"
]
=
dict
()
dataset_opts
[
"train"
][
"sampler"
]
=
dict
()
dataset_opts
[
"train"
][
"sampler"
][
"examples_per_speaker"
]
=
1
dataset_opts
[
"train"
][
"sampler"
][
"examples_per_speaker"
]
=
1
dataset_opts
[
"train"
][
"sampler"
][
"samples_per_speaker"
]
=
100
dataset_opts
[
"train"
][
"sampler"
][
"samples_per_speaker"
]
=
100
...
@@ -944,7 +944,6 @@ def update_training_dictionary(dataset_description,
...
@@ -944,7 +944,6 @@ def update_training_dictionary(dataset_description,
training_opts
[
"best_model_name"
]
=
"best_model.pt"
training_opts
[
"best_model_name"
]
=
"best_model.pt"
training_opts
[
"checkpoint_frequency"
]
=
"10"
training_opts
[
"checkpoint_frequency"
]
=
"10"
# Use options from the YAML config files
# Use options from the YAML config files
fill_dict
(
dataset_opts
,
tmp_data_dict
)
fill_dict
(
dataset_opts
,
tmp_data_dict
)
fill_dict
(
model_opts
,
tmp_model_dict
)
fill_dict
(
model_opts
,
tmp_model_dict
)
...
...
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