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

Loading CIFAR10 - C #168

Closed balditommaso closed 9 months ago

balditommaso commented 9 months ago

I am trying to use CIFAR - C to evaluate my models' robustness, but the import of the dataset is returning an error:

from robustbench.data import load_cifar10c

AttributeError: module 'timm.models.xcit' has no attribute 'Xcit'

fra31 commented 9 months ago

Hi,

you probably need to upgrade the timm version, see https://github.com/RobustBench/robustbench/pull/163.

balditommaso commented 9 months ago

Thank you! Now, I have a different error:

----> [1] from robustbench.data import load_cifar10c
----> [1] from .data import load_cifar10
[...]
File [/opt/conda/envs/loss_landscape/lib/python3.8/site-packages/robustbench/model_zoo/architectures/robustarch_wide_resnet.py:363], in BottleneckTransform()
TypeError: 'type' object is not subscriptable

Let me know if you want more information about the error stack trace.

fra31 commented 9 months ago

I think it has to do with the python version, see comment here https://github.com/RobustBench/robustbench/blob/f6d07682e6ae1a5221b0399a3f3033261a407bbd/robustbench/model_zoo/architectures/robustarch_wide_resnet.py#L10

balditommaso commented 9 months ago

Thank you! Now, it's working fine.