Issue with access to doc tensors from en_core_web_trf version 3.7.3 #13456
Unanswered
kbillesk
asked this question in
Help: Coding & Implementations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Spacy 3.7.4
If I run the following code, it works with en_core_web_trf ver. 3.3.0 but stopped working with 3.7.3
import spacy nlp = spacy.load('en_core_web_trf', exclude=["parser", "tagger", "morphologizer", "lemmatizer", "attribute_ruler", "ner"]) text = "This is a short text" doc = nlp(text) embeddings = doc._.trf_data.tensors ids = doc._.trf_data.tokens print(embeddings) print(ids)
The error returned with version 3.7.3 is:
AttributeError: 'DocTransformerOutput' object has no attribute 'tensors'
Beta Was this translation helpful? Give feedback.
All reactions