Downloads · 30 days
0
mzweilin/robust-imagenet-models
robust-imagenet-models is a machine learning model from mzweilin. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
All credits go to https://huggingface.co/madrylab/robust-imagenet-models
Downloads · 30 days
0
Access
Public
Updated Dec 12, 2024
Repo size
17.4 GB
Likes
0
Public
Click a slice to open those files.
.pth17.4 GB · 100%
From the Hugging Face model README
All credits go to https://huggingface.co/madrylab/robust-imagenet-models
I simply extracted the model weights from their checkpoints, so they are loadable in PyTorch.
You can verify that the files contain model weights that are identical to the checkpoints. The verification process will be slow, because you need to download 33GB of the original checkpoints.
python -m venv .venv
source .venv/bin/activate
pip install huggingface-hub torch torchvision tqdm
python verify.py
import torch
from torchvision.models import resnet18
model = resnet18()
model.load_state_dict(torch.load("resnet18_l2_eps1.pth", weights_only=True))