问题遇到的现象和发生背景
从GITHUB下载了一个可以生成中文文本的项目:https://github.com/Morizeyao/GPT2-Chinese来学习,前几天一直在研究代码,今天想试试生成文本来着,但是报错了。
问题相关代码,请勿粘贴截图
python F:\GTP\GPT-Chinese\GPT2-Chinese-old_gpt_2_chinese_before_2021_4_22\generate.py --length=50 --nsamples=4 --prefix=[CLS]你好--fast_pattern --save_samples --save_samples_path=./text
运行结果及报错内容
ValueError: Can't find a vocabulary file at path 'cache/vocab_small.txt'. To load the vocabulary from a Google pretrained model use tokenizer = BertTokenizer.from_pretrained(PRETRAINED_MODEL_NAME)
我的解答思路和尝试过的方法
我看了一下我的 'cache/vocab_small.txt',发现应该已经分好词了呀,如图:
我想要达到的结果
望各位有识之士不吝赐教