Mar*_*ari 3 python spacy spacy-3
到目前为止,我一直在使用 spacy 2.3.1,并为我的自定义语言类训练并保存了几个管道。但现在使用 spacy 3.0,spacy.load('model-path')我面临着诸如此类config.cfg file not found的错误等问题。
升级 spacy 后是否必须从头开始训练模型?是否有迁移训练模型的分步指南?
恐怕您将无法仅迁移经过训练的管道。使用 v2 训练的管道与 v3 不兼容,因此您无法直接使用spacy.load它们。
您必须将代码库迁移到 v3,并重新训练模型。您有两个选择:
init config,例如:python -m spacy init config config.cfg --lang en --pipeline ner,textcat --optimize accuracy
Run Code Online (Sandbox Code Playgroud)
这将为您提供一些合理的默认设置,以及一个可以根据您的要求进一步自定义的配置文件。
| 归档时间: |
|
| 查看次数: |
1362 次 |
| 最近记录: |