scu-zjz / IMDLBenCo

A comprehensive benchmark & codebase for Image manipulation detection/localization.
https://scu-zjz.github.io/IMDLBenCo-doc
Creative Commons Attribution 4.0 International
22 stars 3 forks source link

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

Open SunnyHaze opened 3 weeks ago

SunnyHaze commented 3 weeks 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.