huggingface / neuralcoref

✨Fast Coreference Resolution in spaCy with Neural Networks
https://huggingface.co/coref/
MIT License
2.84k stars 474 forks source link

input array shape error , #275

Closed firasfrikha closed 2 years ago

firasfrikha commented 4 years ago

Hello everyone,

i'm trying to load my trained model to spacy pipe line. when i'am trying to load a sentence i get the followin error

f=nlp('Je suis Firas')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-4-cd42a45d2899> in <module>
----> 1 f=nlp('Je suis FIras')

~/anaconda3/envs/coref1/lib/python3.8/site-packages/spacy/language.py in __call__(self, text, disable, component_cfg)
    437             if not hasattr(proc, "__call__"):
    438                 raise ValueError(Errors.E003.format(component=type(proc), name=name))
--> 439             doc = proc(doc, **component_cfg.get(name, {}))
    440             if doc is None:
    441                 raise ValueError(Errors.E005.format(name=name))

neuralcoref.pyx in neuralcoref.neuralcoref.NeuralCoref.__call__()

neuralcoref.pyx in neuralcoref.neuralcoref.NeuralCoref.predict()

neuralcoref.pyx in neuralcoref.neuralcoref.NeuralCoref.get_mention_embeddings()

ValueError: could not broadcast input array from shape (300) into shape (50)

could any one help me please, Thank you

svlandeg commented 3 years ago

It looks like somehow there's an embedding layer in your pipeline with mismatched dimensions. How was nlp defined? Can you provide a minimal code snippet that produces this error?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.