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
c8d0b2a3
Commit
c8d0b2a3
authored
Apr 08, 2021
by
Anthony Larcher
Browse files
monitor display
parent
a23b8549
Changes
1
Hide whitespace changes
Inline
Side-by-side
nnet/xvector.py
View file @
c8d0b2a3
...
...
@@ -1319,8 +1319,16 @@ def new_xtrain(dataset_description,
training_description
,
kwargs
)
# Initialize the training monitor
monitor
=
TrainingMonitor
(
output_file
=
training_opts
[
"log_file"
],
patience
=
training_opts
[
"patience"
],
best_accuracy
=
0.0
,
best_eer_epoch
=
1
,
best_eer
=
100
,
compute_test_eer
=
training_opts
[
"compute_test_eer"
])
# Initialize the logger in file and console
init_logging
(
filename
=
training_opts
[
"log_file"
])
#
init_logging(filename=training_opts["log_file"])
# Display the entire configurations as YAML dictionnaries
logging
.
info
(
yaml
.
dump
(
dataset_opts
,
default_flow_style
=
False
))
...
...
@@ -1365,14 +1373,6 @@ def new_xtrain(dataset_description,
if
training_opts
[
"mixed_precision"
]:
scaler
=
torch
.
cuda
.
amp
.
GradScaler
()
# Initialize the training monitor
monitor
=
TrainingMonitor
(
output_file
=
"log/training_xv.log"
,
patience
=
training_opts
[
"patience"
],
best_accuracy
=
0.0
,
best_eer_epoch
=
1
,
best_eer
=
100
,
compute_test_eer
=
training_opts
[
"compute_test_eer"
])
for
epoch
in
range
(
1
,
training_opts
[
"epochs"
]
+
1
):
monitor
.
update
(
epoch
)
...
...
@@ -1383,11 +1383,10 @@ def new_xtrain(dataset_description,
break
model
=
new_train_epoch
(
model
,
epoch
,
monitor
,
training_loader
,
optimizer
,
scheduler
,
training_opts
[
"log_interval"
],
device
,
scaler
=
scaler
)
...
...
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