mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +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()
|
||||
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:
|
||||
device = None
|
||||
for proc in self.pipeline:
|
||||
|
|
Loading…
Reference in New Issue
Block a user