tunz / transformer-pytorch

Transformer implementation in PyTorch.
https://tunz.kr/post/4
MIT License
464 stars 102 forks source link

de_core_news_sm和en_core_web_sm应该放在哪个目录下 #9

Open xiao-liya opened 6 months ago

xiao-liya commented 6 months ago

我是在github上下载的两个模型,不知道放在哪个目录下,会报错: Traceback (most recent call last): File "/home/liying/transformer-pytorch-master/train.py", line 213, in main() File "/home/liying/transformer-pytorch-master/train.py", line 148, in main problem.prepare(opt.problem, opt.data_dir, opt.max_length, File "/home/liying/transformer-pytorch-master/dataset/problem.py", line 10, in prepare from dataset import translation File "/home/liying/transformer-pytorch-master/dataset/translation.py", line 19, in spacy_de = spacy.load('de_core_news_sm') File "/opt/conda/lib/python3.10/site-packages/spacy/init.py", line 51, in load return util.load_model( File "/opt/conda/lib/python3.10/site-packages/spacy/util.py", line 472, in load_model raise IOError(Errors.E050.format(name=name)) OSError: [E050] Can't find model 'de_core_news_sm'. It doesn't seem to be a Python package or a valid path to a data directory. 请问怎么解决