mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Make ParserModel.resize_output idempotent
This commit is contained in:
parent
9fc8ce0c4d
commit
99a84e4d0e
|
@ -201,6 +201,8 @@ class ParserModel(Model):
|
|||
return step_model, finish_parser_update
|
||||
|
||||
def resize_output(self, new_output):
|
||||
if new_output == self.upper.nO:
|
||||
return
|
||||
smaller = self.upper
|
||||
larger = Affine(new_output, smaller.nI)
|
||||
larger.W *= 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user