diff --git a/spacy/ml/tb_framework.pyx b/spacy/ml/tb_framework.pyx index d08ff9c6e..f0316d8f9 100644 --- a/spacy/ml/tb_framework.pyx +++ b/spacy/ml/tb_framework.pyx @@ -336,7 +336,7 @@ def _forward_fallback( all_ids.append(ids) all_statevecs.append(statevecs) all_which.append(which) - if max_moves >= 1 and n_moves >= max_moves: + if n_moves >= max_moves >= 1: break n_moves += 1 diff --git a/spacy/pipeline/transition_parser.pyx b/spacy/pipeline/transition_parser.pyx index 9a6543453..085fd8ea8 100644 --- a/spacy/pipeline/transition_parser.pyx +++ b/spacy/pipeline/transition_parser.pyx @@ -381,7 +381,7 @@ class Parser(TrainablePipe): state.c.history.push_back(clas) output.append(costs) batch = [(s, h, g) for s, h, g in batch if len(h) != 0] - if max_moves >= 1 and n_moves >= max_moves: + if n_moves >= max_moves >= 1: break n_moves += 1