mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 04:10:20 +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_ids.append(ids)
|
||||||
all_statevecs.append(statevecs)
|
all_statevecs.append(statevecs)
|
||||||
all_which.append(which)
|
all_which.append(which)
|
||||||
if max_moves >= 1 and n_moves >= max_moves:
|
if n_moves >= max_moves >= 1:
|
||||||
break
|
break
|
||||||
n_moves += 1
|
n_moves += 1
|
||||||
|
|
||||||
|
|
|
@ -381,7 +381,7 @@ class Parser(TrainablePipe):
|
||||||
state.c.history.push_back(clas)
|
state.c.history.push_back(clas)
|
||||||
output.append(costs)
|
output.append(costs)
|
||||||
batch = [(s, h, g) for s, h, g in batch if len(h) != 0]
|
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
|
break
|
||||||
n_moves += 1
|
n_moves += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user