DiffPure icon indicating copy to clipboard operation
DiffPure copied to clipboard

Regarding run_cifar_rand_inf.sh error (_pickle.UnpicklingError: invalid load key, '<'.)

Open dongfeicui opened this issue 2 years ago • 0 comments

from robustbench.utils import load_model

model = load_model(model_name='Standard', dataset='cifar10', threat_model='Linf')

I get Standard.pt but also I get error

_pickle.UnpicklingError: invalid load key, '<'.

This is because the content of the "Standard.pt" file is, in reality, an HTML webpage used to download the model weights from Google Drive. You need to change the file extension to ".html," then open it with a web browser, and proceed to download the weights. In my example, you will obtain "natural.pt.tar." You should then rename it to "Standard.pt," as this is the file that the program is actually expecting.

china download mirror or visit this website

dongfeicui avatar Oct 21 '23 12:10 dongfeicui