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
307a61a8
Commit
307a61a8
authored
Mar 28, 2019
by
Anthony Larcher
Browse files
minor fixes
parent
05c02acb
Changes
2
Hide whitespace changes
Inline
Side-by-side
bosaris/idmap.py
View file @
307a61a8
...
...
@@ -379,8 +379,8 @@ class IdMap:
im_list
.
append
(
IdMap
())
im_list
[
ii
].
leftids
=
self
.
leftids
[
sub_indices
[
ii
]]
im_list
[
ii
].
rightids
=
self
.
rightids
[
sub_indices
[
ii
]]
im_list
[
ii
].
start
=
self
.
start
ids
[
sub_indices
[
ii
]]
im_list
[
ii
].
start
=
self
.
start
[
sub_indices
[
ii
]]
im_list
[
ii
].
stop
=
self
.
stop
[
sub_indices
[
ii
]]
assert
im_list
[
ii
].
validate
(),
"Error: wrong IdMap format"
return
im_list
\ No newline at end of file
return
im_list
nnet/xvector.py
View file @
307a61a8
...
...
@@ -694,18 +694,11 @@ def extract_idmap(args, device_ID, segment_indices, fs_params, idmap_name, outpu
output_queue
.
put
((
segment_indices
,
emb_1
,
emb_2
,
emb_3
,
emb_4
,
emb_5
,
emb_6
))
def
extract_parallel
(
args
,
fs_params
,
dataset
):
def
extract_parallel
(
args
,
fs_params
):
emb_a_size
=
512
emb_b_size
=
512
if
dataset
==
'enroll'
:
idmap_name
=
args
.
enroll_idmap
elif
dataset
==
'test'
:
idmap_name
=
args
.
test_idmap
elif
dataset
==
'back'
:
idmap_name
=
args
.
back_idmap
idmap
=
IdMap
(
idmap_name
)
idmap
=
IdMap
(
args
.
idmap
)
x_server_1
=
StatServer
(
idmap
,
1
,
emb_a_size
)
x_server_2
=
StatServer
(
idmap
,
1
,
emb_b_size
)
...
...
@@ -740,7 +733,7 @@ def extract_parallel(args, fs_params, dataset):
processes
=
[]
for
rank
in
range
(
args
.
num_processes
):
p
=
mp
.
Process
(
target
=
extract_idmap
,
args
=
(
args
,
rank
,
segment_idx
[
rank
],
fs_params
,
idmap
_name
,
output_queue
)
args
=
(
args
,
rank
,
segment_idx
[
rank
],
fs_params
,
args
.
idmap
,
output_queue
)
)
# We first train the model across `num_processes` processes
p
.
start
()
...
...
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