small batch_size causes bad result
piaozhx opened this issue · comments
Zhixin Piao commented
when I run the test scripts with batch_size=8:
python scripts/test_pose_transfer_model.py --gpu_ids 0 --id PoseTransfer_0.5 --batch_size 8 --n_vis 8 --which_epoch best --save_output
but if I change batch_size to 1:
python scripts/test_pose_transfer_model.py --gpu_ids 0 --id PoseTransfer_0.5 --batch_size 1 --n_vis 8 --which_epoch best --save_output
Yining Li commented
This is probably caused by the BN layer in the model. BN layers will track running statistics (mean and variance) in testing, so using a different batch_size from training setting (especially small batch_size like 1) will change the statistics of a minibatch, and lead to worse performance.
Zhixin Piao commented