Media-Smart / vedadet

A single stage object detection toolbox based on PyTorch
Apache License 2.0
498 stars 128 forks source link

Cannot set parameter in SnapshotHook #92

Closed freshn closed 2 years ago

freshn commented 2 years ago

By setting hooks = [ dict(typename='SnapshotHook', interval=1, save_optim_flag=False, max_keep_ckpts=3), ] I hope to keep only the last three checkpoints of weights. But it still saves weights, meta and optim checkpoints after all epochs. Could you help to solve this problem? It does not work as what it should be according to vedacore/hooks/snapshot.py.

freshn commented 2 years ago

This issue is caused by several minor mistakes in vedacore/hooks/snapshot.py and vedacore/loopers/base_looper.py. I have fixed it. Perhaps pull request if required.