scu-zjz / IMDLBenCo

[NeurIPS'24 Spotlight] A comprehensive benchmark & codebase for Image manipulation detection/localization.
https://scu-zjz.github.io/IMDLBenCo-doc
Creative Commons Attribution 4.0 International
77 stars 12 forks source link

Division by zero issue occurs when batch_size*world_size > dataset length. #19

Open SunnyHaze opened 5 months ago

SunnyHaze commented 5 months ago

Primarily originates from here, and the code needs to be refactored to resolve this.

https://github.com/scu-zjz/IMDLBenCo/blob/5e37d6ff6e64532327a3c5f5b2c0cb7c7bd14b56/IMDLBenCo/training_scripts/utils/misc.py#L175

Temporarily recommend reducing the test_batchsize to avoid this issue.