Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tensorflow create_pretraining_data.py在训练自定义BERT模型时正在向tf_examples.tfrecord写入0条记录_Tensorflow_Nlp_Bert Language Model_Google Natural Language - Fatal编程技术网

Tensorflow create_pretraining_data.py在训练自定义BERT模型时正在向tf_examples.tfrecord写入0条记录

Tensorflow create_pretraining_data.py在训练自定义BERT模型时正在向tf_examples.tfrecord写入0条记录,tensorflow,nlp,bert-language-model,google-natural-language,Tensorflow,Nlp,Bert Language Model,Google Natural Language,我正在自己的语料库上编写一个自定义的BERT模型,我使用BertWordPieceTokenizer生成了vocab文件,然后运行下面的代码 !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

我正在自己的语料库上编写一个自定义的BERT模型,我使用BertWordPieceTokenizer生成了vocab文件,然后运行下面的代码

!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:**读取输入文件***

INFO:tensorflow:**写入输出文件***

INFO:tensorflow:/content/sample\u data/tf\u examples.tfrecord

INFO:tensorflow:总共写入了0个实例

不确定为什么我总是在
tf\u examples.tfrecord
中得到0个实例,我做错了什么

我正在使用TF 1.12版 仅供参考。生成的vocab文件为290KB