Training could not load pretraining (tok2vec) weights #9257
-
I have trained a tok2vec using spacy pretrain. the weights are saved as model999.bin. i am using this command: python3 -m spacy train config.cfg --output ./output --paths.train ./train.spacy --paths.dev ./val.spacy --paths.init_tok2vec ./pretrainingoutput/model999.bin I am using this config file. [paths] [system] [nlp] [components] [components.ner] [components.ner.model] [components.ner.model.tok2vec] [components.tok2vec] [components.tok2vec.model] [components.tok2vec.model.embed] [components.tok2vec.model.encode] [corpora] [corpora.dev] [corpora.train] [training] [training.batcher] [training.batcher.size] [training.logger] [training.optimizer] [training.score_weights] [pretraining] [initialize] [initialize.components] [initialize.tokenizer] |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You need to use the same config that u used for pretraining, your current config needs to have the pretraining config in it .. only then the pre-trained weight can be used |
Beta Was this translation helpful? Give feedback.
-
Please have a look through the docs here: https://spacy.io/usage/embeddings-transformers#pretraining And for future reference - have a look at https://www.markdownguide.org/basic-syntax/ to ensure your post is more readable - in particular notice the use of backticks to quote code. Thanks! |
Beta Was this translation helpful? Give feedback.
You need to use the same config that u used for pretraining, your current config needs to have the pretraining config in it .. only then the pre-trained weight can be used