mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
dont use get_array_module (#11056)
This commit is contained in:
parent
e9eb59699f
commit
5240baccfe
|
@ -192,7 +192,7 @@ class TextCategorizer(TrainablePipe):
|
|||
if not any(len(doc) for doc in docs):
|
||||
# Handle cases where there are no tokens in any docs.
|
||||
tensors = [doc.tensor for doc in docs]
|
||||
xp = get_array_module(tensors)
|
||||
xp = self.model.ops.xp
|
||||
scores = xp.zeros((len(list(docs)), len(self.labels)))
|
||||
return scores
|
||||
scores = self.model.predict(docs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user