BR-IDL / PaddleViT

:robot: PaddleViT: State-of-the-art Visual Transformer and MLP Models for PaddlePaddle 2.0+
https://github.com/BR-IDL/PaddleViT
Apache License 2.0
1.21k stars 317 forks source link

fix batch size defaults to None in eval mode #148

Closed SigureMo closed 2 years ago

SigureMo commented 2 years ago

https://github.com/BR-IDL/PaddleViT/blob/de1ad11c0e7865570d0ab1ac4dfb56c3b3699899/image_classification/BEiT/config.py#L165-L167

目前 eval mode 如果不通过参数指定 batch_size,由于没有对 args.batch_size 值进行校验,会将默认值 None 传给 BATCH_SIZE_EVAL,因此对该逻辑进行了修正~

xperzy commented 2 years ago

Good Work! LGTM!