mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-03 20:00:21 +03:00
Use chained conditional
This commit is contained in:
parent
672cad7161
commit
850ce0583d
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user