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
72d69a4e
Commit
72d69a4e
authored
Nov 02, 2018
by
VictorSanh
Browse files
Update README
parent
62ac7e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
README.md
README.md
+18
-1
No files found.
README.md
View file @
72d69a4e
...
@@ -15,7 +15,7 @@ TensorFlow pre-trained models can be found in the [original TensorFlow code](htt
...
@@ -15,7 +15,7 @@ TensorFlow pre-trained models can be found in the [original TensorFlow code](htt
export
BERT_BASE_DIR
=
/path/to/bert/uncased_L-12_H-768_A-12
export
BERT_BASE_DIR
=
/path/to/bert/uncased_L-12_H-768_A-12
export
BERT_PYTORCH_DIR
=
/path/to/pytorch/bert/uncased_L-12_H-768_A-12
export
BERT_PYTORCH_DIR
=
/path/to/pytorch/bert/uncased_L-12_H-768_A-12
python
3.6
convert_tf_checkpoint_to_pytorch.py
\
python convert_tf_checkpoint_to_pytorch.py
\
--tf_checkpoint_path
=
$BERT_BASE_DIR
/bert_model.ckpt
\
--tf_checkpoint_path
=
$BERT_BASE_DIR
/bert_model.ckpt
\
--bert_config_file
=
$BERT_BASE_DIR
/bert_config.json
\
--bert_config_file
=
$BERT_BASE_DIR
/bert_config.json
\
--pytorch_dump_path
=
$BERT_PYTORCH_DIR
/pytorch_model.bin
--pytorch_dump_path
=
$BERT_PYTORCH_DIR
/pytorch_model.bin
...
@@ -54,6 +54,23 @@ python run_classifier_pytorch.py \
...
@@ -54,6 +54,23 @@ python run_classifier_pytorch.py \
```
```
```
shell
python run_squad_pytorch.py
\
--vocab_file
=
$BERT_BASE_DIR
/vocab.txt
\
--bert_config_file
=
$BERT_BASE_DIR
/bert_config.json
\
--init_checkpoint
=
$BERT_PYTORCH_DIR
/pytorch_model.bin
\
--do_train
\
--train_file
=
$SQUAD_DIR
/train-v1.1.json
\
--do_predict
\
--predict_file
=
$SQUAD_DIR
/dev-v1.1.json
\
--train_batch_size
=
12
\
--learning_rate
=
5e-5
\
--num_train_epochs
=
2.0
\
--max_seq_length
=
384
\
--doc_stride
=
128
\
--output_dir
=
/tmp/squad_base_pytorch/
```
...
...
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