mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
More fixes for issue #3112
This commit is contained in:
parent
80bdcb99c5
commit
d396a69c7b
|
@ -204,7 +204,9 @@ class ParserModel(Model):
|
|||
if new_output == self.upper.nO:
|
||||
return
|
||||
smaller = self.upper
|
||||
larger = Affine(new_output, smaller.nI)
|
||||
|
||||
with Model.use_device('cpu'):
|
||||
larger = Affine(new_output, smaller.nI)
|
||||
# Set nan as value for unseen classes, to prevent prediction.
|
||||
larger.W.fill(self.ops.xp.nan)
|
||||
larger.b.fill(self.ops.xp.nan)
|
||||
|
|
Loading…
Reference in New Issue
Block a user