[英]Training Spacy model per multiprocessing
I'm training my model with the update function:我正在使用更新 function 训练我的 model:
for batch in minibatch(TRAIN_DATA, size=10):
for text, annotations in batch:
doc = nlp.make_doc(text)
example = Example.from_dict(doc, annotations)
nlp.update([example], drop=0.35, sgd=optimizer, losses=losses)
This training only uses one cpu core, with spacy 3.2.3 What can be done, to train in multiprocessing?这个训练只使用一个 cpu 核心,spacy 3.2.3 可以做什么,训练多处理?
As far as I know, the training is iterative, butI know that spacy has that feature.据我所知,训练是迭代的,但我知道 spacy 具有该功能。 When using a pipe, the number of processes can be defined.使用pipe时,可以定义进程数。 But in training?但是在训练中?
It looks like, aab is right.看起来,aab 是对的。 Here is an older post of the Github Repo: https://github.com/explosion/spaCy/issues/3507这是 Github Repo 的旧帖子: https://github.com/explosion/spaCy/issues/3507
Its all right with me.我没关系。 I try to train it on a GPU to speed up the process.我尝试在 GPU 上训练它以加快这个过程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.