mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Copy vectors to GPU on begin training
This commit is contained in:
parent
3fa76c17d1
commit
c858927271
|
@ -364,6 +364,9 @@ class Language(object):
|
||||||
device.use()
|
device.use()
|
||||||
Model.ops = CupyOps()
|
Model.ops = CupyOps()
|
||||||
Model.Ops = CupyOps
|
Model.Ops = CupyOps
|
||||||
|
if self.vocab.vectors.data.shape[1] >= 1:
|
||||||
|
self.vocab.vectors.data = Model.ops.asarray(
|
||||||
|
self.vocab.vectors.data)
|
||||||
else:
|
else:
|
||||||
device = None
|
device = None
|
||||||
for proc in self.pipeline:
|
for proc in self.pipeline:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user