mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-15 06:09:01 +03:00
Fix char_embed for gpu
This commit is contained in:
parent
f4040a98f0
commit
a6a2ff217f
|
@ -932,7 +932,7 @@ class CharacterEmbed(Model):
|
||||||
# for the tip.
|
# for the tip.
|
||||||
nCv = self.ops.xp.arange(self.nC)
|
nCv = self.ops.xp.arange(self.nC)
|
||||||
for doc in docs:
|
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))
|
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
|
# Let's say I have a 2d array of indices, and a 3d table of data. What numpy
|
||||||
# incantation do I chant to get
|
# incantation do I chant to get
|
||||||
|
|
Loading…
Reference in New Issue
Block a user