-
I am training the PPOCRv3 model for text recognition and noticed something unexpected. During training, I consistently saw accuracies above 0.92, for example [2024/10/17 21:24:02] ppocr INFO: epoch: [10/10], global_step: 62540, lr: 0.000501, acc: 0.937500 .... However, after training, the model saved as "best" has a lower accuracy of 0.87: Why was the model with lower accuracy (0.87) saved instead of the ones with higher accuracy (above 0.92) during training? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
The higher training accuracies you observed (above 0.92) were calculated on the training data and may be inflated due to overfitting. The "best" model is saved based on the highest validation accuracy achieved on a separate validation set. In your case, the model achieved its peak validation accuracy of 0.87 at epoch 3, so the model from that epoch was saved as the "best," despite higher training accuracies in later epochs. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your reply! I have one more question regarding the model files generated during training. When the model is saved, I notice multiple types of .pdparams files (except the iterative ones).
I understand that the export is typically done using latest.pdparams, which contains the model parameters from the most recent epoch. However, I am curious about the others. Could you explain the difference between these files and when I should use one instead of the others? |
Beta Was this translation helpful? Give feedback.
-
got it, thanks a lot |
Beta Was this translation helpful? Give feedback.
The higher training accuracies you observed (above 0.92) were calculated on the training data and may be inflated due to overfitting. The "best" model is saved based on the highest validation accuracy achieved on a separate validation set. In your case, the model achieved its peak validation accuracy of 0.87 at epoch 3, so the model from that epoch was saved as the "best," despite higher training accuracies in later epochs.