Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
c48546c7
"...resnet50_tensorflow.git" did not exist on "fe6829597a381e8ddecbf901143bae23a3529622"
Unverified
Commit
c48546c7
authored
Aug 31, 2020
by
Sylvain Gugger
Committed by
GitHub
Aug 31, 2020
Browse files
Fix resuming training for Windows (#6847)
parent
d2f9cb83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/trainer.py
src/transformers/trainer.py
+1
-1
No files found.
src/transformers/trainer.py
View file @
c48546c7
...
...
@@ -644,7 +644,7 @@ class Trainer:
if
model_path
is
not
None
:
# set global_step to global_step of last saved checkpoint from model path
try
:
self
.
global_step
=
int
(
model_path
.
split
(
"-"
)[
-
1
].
split
(
"/"
)[
0
])
self
.
global_step
=
int
(
model_path
.
split
(
"-"
)[
-
1
].
split
(
os
.
path
.
sep
)[
0
])
epochs_trained
=
self
.
global_step
//
(
len
(
train_dataloader
)
//
self
.
args
.
gradient_accumulation_steps
)
steps_trained_in_current_epoch
=
self
.
global_step
%
(
len
(
train_dataloader
)
//
self
.
args
.
gradient_accumulation_steps
...
...
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