mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
tensorizer return parameter fix
This commit is contained in:
parent
0a27afbf86
commit
a2162b8908
|
@ -777,7 +777,8 @@ class TextCategorizer(Pipe):
|
||||||
def predict(self, docs):
|
def predict(self, docs):
|
||||||
scores = self.model(docs)
|
scores = self.model(docs)
|
||||||
scores = self.model.ops.asarray(scores)
|
scores = self.model.ops.asarray(scores)
|
||||||
return scores
|
tensors = [doc.tensor for doc in docs]
|
||||||
|
return scores, tensors
|
||||||
|
|
||||||
def set_annotations(self, docs, scores, tensors=None):
|
def set_annotations(self, docs, scores, tensors=None):
|
||||||
for i, doc in enumerate(docs):
|
for i, doc in enumerate(docs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user