RobustBench / robustbench

RobustBench: a standardized adversarial robustness benchmark [NeurIPS 2021 Benchmarks and Datasets Track]
https://robustbench.github.io
Other
669 stars 99 forks source link

Question for error when running Linf Imagenet Model #150

Closed lizaitang closed 1 year ago

lizaitang commented 1 year ago

Dear Author, Your code really helps, however, when I load the first model and calculate the clean accuracy, the code reports that 'Input image height (128) doesn't match model (224)'. Could you please provide any idea to solve it? Thanks

fra31 commented 1 year ago

Hi,

could you please provide more details, for example which model is used and possibly a minimal working example? The input image size depends on the preprocessing pipeline. For the pre-trained models this is defined together with the classifier and shouldn't give 128x128 images. Have you maybe passed a different preprocessing function?

lizaitang commented 1 year ago

Thanks, I used 'Liu2023Comprehensive_Swin-L' for imagenet, the data I used is generated by GAN, it works fine for model 'Liu2023Comprehensive_ConvNeXt-L'.

fra31 commented 1 year ago

The model definition of the Swin transformers is taken from timm and the default value for the input size is 224. It might be sufficient to change it e.g. when loading the classifier here (I've not tested it though).

fra31 commented 1 year ago

Closing this for now, let me know if you have any other question.