clovaai / donut

Official Implementation of OCR-free Document Understanding Transformer (Donut) and Synthetic Document Generator (SynthDoG), ECCV 2022
https://arxiv.org/abs/2111.15664
MIT License
5.53k stars 444 forks source link

ValueError: `num_beams` is set to 1 #237

Open yonlas opened 11 months ago

yonlas commented 11 months ago

Hi,

Thank you for your work.

I tried to use this demo on CORD from Niels Rogge, but during the training, it says that: ValueError: num_beams is set to 1. However, early_stopping is set to True -- this flag is only used in beam-based generation modes. Set num_beams>1 or unset early_stopping to continue.

When I used num_beams from 1 to 2 at the point where I defined the Lighting Module, it worked. It worked without this change before, but this time it started giving this error

jamestang7 commented 4 months ago

I resolved it setting the early_stopping=False in the model.py script