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
Gaëtan Caillaut
minibert-oscar
Commits
6d494e7f
Commit
6d494e7f
authored
Jan 29, 2021
by
Gaëtan Caillaut
Browse files
Display len(train_loader)
parent
933846d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
train.py
View file @
6d494e7f
...
...
@@ -142,7 +142,7 @@ if __name__ == "__main__":
if
batch_id
%
args
.
progress
==
0
:
print
(
f
"BATCH
{
batch_id
:
05
}
/
{
epoch
:
0
4
}
- LOSS
{
loss
.
item
()
}
- TIME
{
batch_cumulated_time
}
"
,
flush
=
True
)
f
"BATCH
{
batch_id
:
05
}
/
{
len
(
train_loader
)
:
0
5
}
- LOSS
{
loss
.
item
()
}
- TIME
{
batch_cumulated_time
}
"
,
flush
=
True
)
batch_cumulated_time
=
timedelta
()
writer
.
add_scalar
(
"Loss/train"
,
cumloss
/
len
(
train_loader
),
epoch
)
...
...
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