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?
How to reproduce the behaviour
I trained my own custom spacy ner model with the code below.
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