mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix char_embed for gpu
This commit is contained in:
parent
fa82277398
commit
055b9a9e85
|
@ -932,7 +932,7 @@ class CharacterEmbed(Model):
|
|||
# for the tip.
|
||||
nCv = self.ops.xp.arange(self.nC)
|
||||
for doc in docs:
|
||||
doc_ids = doc.to_utf8_array(nr_char=self.nC)
|
||||
doc_ids = self.ops.asarray(doc.to_utf8_array(nr_char=self.nC))
|
||||
doc_vectors = self.ops.allocate((len(doc), self.nC, self.nM))
|
||||
# Let's say I have a 2d array of indices, and a 3d table of data. What numpy
|
||||
# incantation do I chant to get
|
||||
|
|
Loading…
Reference in New Issue
Block a user