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
4414cb29
Commit
4414cb29
authored
Apr 12, 2021
by
Anthony Larcher
Browse files
parallel
parent
89b36652
Changes
1
Hide whitespace changes
Inline
Side-by-side
nnet/xvector.py
View file @
4414cb29
...
...
@@ -1296,12 +1296,12 @@ def new_xtrain(dataset_description,
# Display the entire configurations as YAML dictionnaries
if
local_rank
<
1
:
monitor
.
logger
.
info
(
"
\n
*********************************
\n
Dataset options
\n
*********************************
\n
"
)
monitor
.
logger
.
info
(
yaml
.
dump
(
dataset_opts
,
default_flow_style
=
False
))
monitor
.
logger
.
info
(
"
\n
*********************************
\n
Model options
\n
*********************************
\n
"
)
monitor
.
logger
.
info
(
yaml
.
dump
(
model_opts
,
default_flow_style
=
False
))
monitor
.
logger
.
info
(
"
\n
*********************************
\n
Training options
\n
*********************************
\n
"
)
monitor
.
logger
.
info
(
yaml
.
dump
(
training_opts
,
default_flow_style
=
False
))
monitor
.
logger
.
info
(
"
\n
*********************************
\n
Dataset options
\n
*********************************
\n
"
)
monitor
.
logger
.
info
(
yaml
.
dump
(
dataset_opts
,
default_flow_style
=
False
))
monitor
.
logger
.
info
(
"
\n
*********************************
\n
Model options
\n
*********************************
\n
"
)
monitor
.
logger
.
info
(
yaml
.
dump
(
model_opts
,
default_flow_style
=
False
))
monitor
.
logger
.
info
(
"
\n
*********************************
\n
Training options
\n
*********************************
\n
"
)
monitor
.
logger
.
info
(
yaml
.
dump
(
training_opts
,
default_flow_style
=
False
))
# Initialize the model
model
=
get_network
(
model_opts
)
...
...
@@ -1309,8 +1309,9 @@ def new_xtrain(dataset_description,
embedding_size
=
model
.
embedding_size
# Set the device and manage parallel processing
device
=
torch
.
cuda
.
device
(
local_rank
)
torch
.
cuda
.
set_device
(
local_rank
)
device
=
torch
.
device
(
"cuda"
)
#
device = torch.device("cuda")
model
.
to
(
device
)
# If multi-gpu
...
...
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