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
2e4db64c
Commit
2e4db64c
authored
Jan 07, 2019
by
thomwolf
Browse files
add do_lower_case tokenizer loading optino in run_squad and ine_tuning examples
parent
c9fd3505
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
examples/run_lm_finetuning.py
examples/run_lm_finetuning.py
+1
-1
examples/run_squad.py
examples/run_squad.py
+1
-1
No files found.
examples/run_lm_finetuning.py
View file @
2e4db64c
...
@@ -515,7 +515,7 @@ def main():
...
@@ -515,7 +515,7 @@ def main():
raise
ValueError
(
"Output directory ({}) already exists and is not empty."
.
format
(
args
.
output_dir
))
raise
ValueError
(
"Output directory ({}) already exists and is not empty."
.
format
(
args
.
output_dir
))
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
tokenizer
=
BertTokenizer
.
from_pretrained
(
args
.
bert_model
)
tokenizer
=
BertTokenizer
.
from_pretrained
(
args
.
bert_model
,
do_lower_case
=
args
.
do_lower_case
)
#train_examples = None
#train_examples = None
num_train_steps
=
None
num_train_steps
=
None
...
...
examples/run_squad.py
View file @
2e4db64c
...
@@ -786,7 +786,7 @@ def main():
...
@@ -786,7 +786,7 @@ def main():
raise
ValueError
(
"Output directory () already exists and is not empty."
)
raise
ValueError
(
"Output directory () already exists and is not empty."
)
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
tokenizer
=
BertTokenizer
.
from_pretrained
(
args
.
bert_model
)
tokenizer
=
BertTokenizer
.
from_pretrained
(
args
.
bert_model
,
do_lower_case
=
args
.
do_lower_case
)
train_examples
=
None
train_examples
=
None
num_train_steps
=
None
num_train_steps
=
None
...
...
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