diff --git a/spacy/syntax/_parser_model.pyx b/spacy/syntax/_parser_model.pyx index 5615fcea1..fd87aab2b 100644 --- a/spacy/syntax/_parser_model.pyx +++ b/spacy/syntax/_parser_model.pyx @@ -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