Skip to content

The file size of best_metric_epoch_N.pth and that of epoch_N.pth are different #1970

@myfrannie

Description

@myfrannie

Branch

main branch (mmpretrain version)

Describe the bug

In order to save the best checkpoint, I set default hook config as checkpoint=dict(type='CheckpointHook', interval=10, save_best='accuracy/top1').
Then below is the result

-a---        2025-02-12  PM 3:20       12351503 best_accuracy_top1_epoch_118.pth
-a---        2025-02-12  AM 8:44       22270961 epoch_100.pth
-a---        2025-02-12 PM 12:06       22445297 epoch_110.pth
-a---        2025-02-12 PM 12:48       22490801 epoch_112.pth
-a---        2025-02-12  PM 3:20       22596081 epoch_118.pth
-a---        2025-02-12  PM 4:23       22620529 epoch_120.pth
-a---        2025-02-12  PM 7:54       22794865 epoch_130.pth
-a---        2025-02-12 PM 11:13       22968305 epoch_140.pth
-a---        2025-02-13  AM 2:33       23142449 epoch_150.pth

Why the file size of best_accuracy_top1_epoch_118.pth is different from that of epoch_118.pth ??
Is there any difference between saving the last checkpoint and saving the best checkpoint?
The inference results are the same in both cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions