我正在自己的语料库上编写一个自定义的BERT模型,我使用BertWordPieceTokenizer生成了corpus文件,然后运行以下代码
!python create_pretraining_data.py
--input_file=/content/drive/My Drive/internet_archive_scifi_v3.txt
--output_file=/content/sample_data/tf_examples.tfrecord
--vocab_file=/content/sample_data/sifi_13sep-vocab.txt
--do_lower_case=True
--max_seq_length=128
--max_predictions_per_seq=20
--masked_lm_prob=0.15
--random_seed=12345
--dupe_factor=5获取输出为:
INFO:tensorflow:*** Reading from input files ***
INFO:tensorflow:*** Writing to output files ***
INFO:tensorflow: /content/sample_data/tf_examples.tfrecord
INFO:tensorflow:Wrote 0 total instances
不确定为什么我在tf_examples.tfrecord中总是得到0个实例,我做错了什么?
我使用的TF version 1.12 FYI..generated词汇文件是290KB。
发布于 2021-06-26 10:37:17
它无法读取输入文件,请使用My\ Drive而不是My Drive
--input_file=/content/drive/My\ Drive/internet_archive_scifi_v3.txthttps://stackoverflow.com/questions/63886230
复制相似问题