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
8ea51326
Commit
8ea51326
authored
Jan 22, 2021
by
Anthony Larcher
Browse files
long xvector segment limit
parent
47e78263
Changes
1
Hide whitespace changes
Inline
Side-by-side
nnet/xvector.py
View file @
8ea51326
...
...
@@ -1082,6 +1082,8 @@ def extract_embeddings(idmap_name,
# Process the data
with
torch
.
no_grad
():
for
idx
,
(
data
,
mod
,
seg
,
start
,
stop
)
in
tqdm
.
tqdm
(
enumerate
(
dataloader
)):
if
data
.
shape
[
1
]
>
20000000
:
data
=
data
[...,:
20000000
]
vec
=
model
(
data
.
to
(
device
),
is_eval
=
True
)
embeddings
.
stat1
[
idx
,
:]
=
vec
.
detach
().
cpu
()
...
...
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