mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-20 00:51:58 +03:00
better copying for warmup docs
This commit is contained in:
parent
a2afc2c44c
commit
70b2d19423
|
@ -173,7 +173,5 @@ def print_outliers(sample: numpy.ndarray):
|
|||
def warmup(
|
||||
nlp: Language, docs: List[Doc], warmup_epochs: int, batch_size: Optional[int]
|
||||
) -> numpy.ndarray:
|
||||
warmup_docs = []
|
||||
for _ in range(warmup_epochs):
|
||||
warmup_docs += [doc.from_docs([doc]) for doc in docs]
|
||||
return annotate(nlp, warmup_docs, batch_size)
|
||||
docs = [doc.copy() for doc in docs * warmup_epochs]
|
||||
return annotate(nlp, docs, batch_size)
|
||||
|
|
Loading…
Reference in New Issue
Block a user