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
653076ca
Unverified
Commit
653076ca
authored
Apr 14, 2021
by
Nithin Holla
Committed by
GitHub
Apr 14, 2021
Browse files
Save the Wav2Vec2 processor before training starts (#10910)
Co-authored-by:
nithin19
<
nithin@amberscript.com
>
parent
3d339ee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
examples/research_projects/wav2vec2/run_common_voice.py
examples/research_projects/wav2vec2/run_common_voice.py
+4
-3
No files found.
examples/research_projects/wav2vec2/run_common_voice.py
View file @
653076ca
...
@@ -476,13 +476,14 @@ def main():
...
@@ -476,13 +476,14 @@ def main():
checkpoint
=
model_args
.
model_name_or_path
checkpoint
=
model_args
.
model_name_or_path
else
:
else
:
checkpoint
=
None
checkpoint
=
None
train_result
=
trainer
.
train
(
resume_from_checkpoint
=
checkpoint
)
trainer
.
save_model
()
#
s
ave the feature_extractor and the tokenizer
#
S
ave the feature_extractor and the tokenizer
if
is_main_process
(
training_args
.
local_rank
):
if
is_main_process
(
training_args
.
local_rank
):
processor
.
save_pretrained
(
training_args
.
output_dir
)
processor
.
save_pretrained
(
training_args
.
output_dir
)
train_result
=
trainer
.
train
(
resume_from_checkpoint
=
checkpoint
)
trainer
.
save_model
()
metrics
=
train_result
.
metrics
metrics
=
train_result
.
metrics
max_train_samples
=
(
max_train_samples
=
(
data_args
.
max_train_samples
if
data_args
.
max_train_samples
is
not
None
else
len
(
train_dataset
)
data_args
.
max_train_samples
if
data_args
.
max_train_samples
is
not
None
else
len
(
train_dataset
)
...
...
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