-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
modelsIssues related to the statistical modelsIssues related to the statistical modelsthird-partyThird-party packages and servicesThird-party packages and services
Description
How to reproduce the behaviour
I trained my own custom spacy ner model with the code below.
import random
from spacy.util import minibatch, compounding
from pathlib import Path
from spacy.training import Example
# TRAINING THE MODEL
nlp_ner=spacy.load('en_core_web_sm')
with nlp_ner.disable_pipes(*unaffected_pipes):
# Training for 30 iterations
for iteration in range(30):
# shuufling examples before every iteration
random.shuffle(NER_TRAINING_DATA)
losses = {}
for batch in spacy.util.minibatch(NER_TRAINING_DATA, size=2):
for text, annotations in batch:
# create Example
doc = nlp_ner.make_doc(text)
example = Example.from_dict(doc, annotations)
# Update the model
nlp_ner.update([example], losses=losses, drop=0.3)I would liked to convert this model into tensorflow format, but couldn't understand or follow the guides.
Is there any documents explaining conversion of trained spacy ner model directly?
Your Environment
- Operating System: Ubuntu18.04
- Python Version Used: 3.10.6
- spaCy Version Used: 3.6.0
- Environment Information:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
modelsIssues related to the statistical modelsIssues related to the statistical modelsthird-partyThird-party packages and servicesThird-party packages and services