google / trax

Trax — Deep Learning with Clear Code and Speed
Apache License 2.0
8.07k stars 813 forks source link

Update decoding.py #1713

Open sunvod opened 2 years ago

sunvod commented 2 years ago

I have noticed that in some cases running the prediction changes the state of the model (model.state) and this change prevents the prediction from being successfully rerun a second time. This modification of the original code ensures that the state is not changed and thus allows the prediction to be repeated successfully.