SAVRN
Search Contact SAVRN

Open-weight model · Image classification

test_resnet.r160_in1k

by PyTorch Image Models timm/test_resnet.r160_in1k

A very small test ResNet image classification model for testing and sanity checks. Trained on ImageNet-1k by Ross Wightman.

Parameters471,768
Context
Weights5.4 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads133.3k

Runs On

What it takes to serve test_resnet.r160_in1k (471,768 parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By PyTorch Image Models, published under apache-2.0, revision 2dca19557ce9.

A very small test ResNet image classification model for testing and sanity checks. Trained on ImageNet-1k by Ross Wightman.

Read PyTorch Image Models's full model card

Model card for test_resnet.r160_in1k

A very small test ResNet image classification model for testing and sanity checks. Trained on ImageNet-1k by Ross Wightman.

Model Details

  • Model Type: Image classification / feature backbone
  • Model Stats:
  • Params (M): 0.5
  • GMACs: 0.1
  • Activations (M): 0.6
  • Image size: 160 x 160
  • Dataset: ImageNet-1k
  • Papers:
  • PyTorch Image Models: https://github.com/huggingface/pytorch-image-models
  • Original: https://github.com/huggingface/pytorch-image-models

Model Usage

Image Classification

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model('test_resnet.r160_in1k', pretrained=True)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5)

Feature Map Extraction

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model(
    'test_resnet.r160_in1k',
    pretrained=True,
    features_only=True,
)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

for o in output:
    # print shape of each feature map in output
    # e.g.:
    #  torch.Size([1, 32, 80, 80])
    #  torch.Size([1, 32, 40, 40])
    #  torch.Size([1, 48, 20, 20])
    #  torch.Size([1, 192, 10, 10])
    #  torch.Size([1, 96, 5, 5])

    print(o.shape)

Image Embeddings

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model(
    'test_resnet.r160_in1k',
    pretrained=True,
    num_classes=0,  # remove classifier nn.Linear
)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # output is (batch_size, num_features) shaped tensor

# or equivalently (without needing to set num_classes=0)

output = model.forward_features(transforms(img).unsqueeze(0))
# output is unpooled, a (1, 96, 5, 5) shaped tensor

output = model.forward_head(output, pre_logits=True)
# output is a (1, num_features) shaped tensor

Model Comparison

By Top-1

model img_size top1 top5 param_count
test_convnext3.r160_in1k 192 54.558 79.356 0.47
test_convnext2.r160_in1k 192 53.62 78.636 0.48
test_convnext2.r160_in1k 160 53.51 78.526 0.48
test_convnext3.r160_in1k 160 53.328 78.318 0.47
test_convnext.r160_in1k 192 48.532 74.944 0.27
test_nfnet.r160_in1k 192 48.298 73.446 0.38
test_convnext.r160_in1k 160 47.764 74.152 0.27
test_nfnet.r160_in1k 160 47.616 72.898 0.38
test_efficientnet.r160_in1k 192 47.164 71.706 0.36
test_efficientnet_evos.r160_in1k 192 46.924 71.53 0.36
test_byobnet.r160_in1k 192 46.688 71.668 0.46
test_efficientnet_evos.r160_in1k 160 46.498 71.006 0.36
test_efficientnet.r160_in1k 160 46.454 71.014 0.36
test_byobnet.r160_in1k 160 45.852 70.996 0.46
test_efficientnet_ln.r160_in1k 192 44.538 69.974 0.36
test_efficientnet_gn.r160_in1k 192 44.448 69.75 0.36
test_efficientnet_ln.r160_in1k 160 43.916 69.404 0.36
test_efficientnet_gn.r160_in1k 160 43.88 69.162 0.36
test_vit2.r160_in1k 192 43.454 69.798 0.46
test_resnet.r160_in1k 192 42.376 68.744 0.47
test_vit2.r160_in1k 160 42.232 68.982 0.46
test_vit.r160_in1k 192 41.984 68.64 0.37
test_resnet.r160_in1k 160 41.578 67.956 0.47
test_vit.r160_in1k 160 40.946 67.362 0.37

Citation

@misc{rw2019timm,
  author = {Ross Wightman},
  title = {PyTorch Image Models},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  doi = {10.5281/zenodo.4414861},
  howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
}

Identity and Version

Repository
timm/test_resnet.r160_in1k
Publisher
PyTorch Image Models
Task
Image classification
Modality
Image
Library
timm
Parameters
471,768 parameters
Languages
Not stated by the source
Revision
2dca19557ce90aff284d524f642b2f2bb454965a
First published
2024-09-22
Last updated
2025-01-21

Files and Weights

8 files, 6.0 MB in total. The weights are 4 files totalling 5.4 MB in bin, safetensors.

Weights4 files · 5.4 MB
Configuration1 file · 552 B
Documentation1 file · 5.4 KB
Other1 file · 601.2 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights1.9 MB c52200aefb47
pytorch_model.binWeights1.9 MB a1d21430aeee
test/owl_tensors.safetensorsWeights321.5 KB e99b6f467b62
test/rand_tensors.safetensorsWeights1.3 MB 4eb0b07459bb
config.jsonConfiguration552 B
README.mdDocumentation5.4 KB
test/test_owl.jpgOther601.2 KB
.gitattributesRepository1.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
5.4 MB
Download from PyTorch Image Models

Released by PyTorch Image Models through its official repository on Hugging Face. Read the license.

Built From

  • Trained on (disclosed) imagenet-1k

Memory Requirements

PrecisionWeights in memory
As published5.4 MB
16-bit0.0 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About test_resnet.r160_in1k

How much GPU memory does test_resnet.r160_in1k need?

About 0 GB at 16-bit and 0 GB at 4-bit: the weights (471,768 parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run test_resnet.r160_in1k on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use test_resnet.r160_in1k commercially?

Yes. test_resnet.r160_in1k is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image classification

swinv2-tiny-patch4-window16-256

Microsoft

Swin Transformer v2 model pre-trained on ImageNet-1k at resolution 256x256. It was introduced in the paper Swin Transformer V2: Scaling Up Capacity and Resolution by Liu et al. and first released in this repository. Disclaimer: The team releasing Swin Transformer v2 did not write a model card for this model so this model card has been written by the Hugging Face team. The Swin Transformer is a type of Vision Transformer. It builds hierarchical feature maps by merging image patches (shown in gray) in deeper layers and has linear computation complexity to input image size due to computation of self-attention only within each local window (shown in red). It can thus serve as a general-purpose…

Open weights apache-2.0 transformers

Model · Image classification

AI-image-detector

Matthew Maybe

NOTE: Unless you are trying to detect imagery generated using older models such as VQGAN+CLIP, please use the updated version of this detector instead. This model is a proof-of-concept demonstration of using a ViT model to predict whether an artistic image was generated using AI. It was created in October 2022, and as such, the training data did not include any samples generated by Midjourney 5, SDXL, or DALLE-3. It still may be able to correctly identify samples from these more recent models due to being trained on outputs of their predecessors. Furthermore the intended scope of this tool is artistic images; that is to say, it is not a deepfake photo detector, and general computer imagery…

Open weights cc-by-4.0 transformers

Model · Image classification

traffic-sign-adverse-weather

Yy

Official model checkpoints for the solution in the Traffic Sign Recognition under Adverse Weather Competition. See classes.txt for the 25 traffic sign classes. For inference scripts, training code, and in-depth engineering retrospective, visit the GitHub Repository.

Open weights mit timm

Model · Image classification

tinyvit-5m-int8-imagenet

Core Epoch

TinyViT-5M (timm/tinyvit5m224.distin22kftin1k, Apache-2.0) quantized to INT8 with Kenosis — 128-image calibration, no retraining. 80.53% top-1 from a 9.2 MB single file, on ONNX Runtime or OpenVINO, CPU or GPU, no accelerator required. ImageNet-1K validation, 49,872 images (disjoint from the 128 calibration images). Measured on a CPU with AVX-VNNI; on CPUs without VNNI this model's INT8 top-1 sits ~0.9 below FP32 rather than 0.34. Input 1x3x224x224, RGB, /255, ImageNet mean/std. Output logits [1,1000], sorted-synset order. runclassify.py / evalimagenet.py reproduce the demo and table. tinyvit5m224int8kenosis.onnx (9,228,567 B) — SHA-256…

Open weights apache-2.0 onnx

Model · Image classification

mmfm-breast-imaging-checkpoints

NFadlallah

ResNet-18 binary (benign vs. malignant) classification checkpoints, trained per-dataset on eight public breast-imaging sources spanning ultrasound, Full write-up, methodology, and comparison to each source paper's own These are single-modality baselines, not the 3-branch fusion model. Each checkpoint is models.SingleBackboneClassifier (one ResNet-18 backbone, ImageNet-pretrained, first conv adapted for non-RGB inputs where applicable) — see models/backbone.py / training/train.py in the repo for the loading code. For the 5-fold datasets, this is one fold's checkpoint, not an ensemble or the averaged model — reported accuracy is the 5-fold mean from the full report for context, not this…

Open weights cc-by-4.0