All models

resmlp_big_24_224

An image classifier built only from linear layers and MLPs applied to image patches, with residual connections.

Image classification · 416 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (14 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
resmlp
Parameters
129.1M
Operations
416
Framework
PyTorch
Recurrent
No
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m8813
Graph hash
e6a097e10e4920033965189ce0dcf5eccadd66e4697e8ba1504b2acfd7785473
Skeleton hash
7ea1d9ec2d6ae7f5ecfd1529171ed5d0a1bfe5b090775be5bf7e4a1dee9711c6
Architecture hash
934bba01afeddef1a290282233aa3ecbe1ef449dd8afd0c95abd23da62b94c3e
Diagram SHA-256
9b4086b6527614934258ab5b81e78cce8f5898a2c67746c0229fe1c814fac432
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

timm.create_model('resmlp_big_24_224', pretrained=False)

What it is

This model is ResMLP-B-24; the paper lists a 24-layer configuration with a wider working dimension of 768.

About this model's family

ResMLP is an image classification network built entirely from multi-layer perceptrons (MLPs). It takes image patches, projects them with a linear layer, and then repeatedly applies two residual steps: a linear layer through which patches exchange information, applied to all channels independently, and a small MLP that mixes channels within each patch. At the end, the patch representations are average pooled and fed to a linear classifier.

The paper presents the design as a simplified Vision Transformer (ViT): the self-attention sublayer is replaced by a linear layer, leaving only linear layers and the GELU non-linearity. There is no positional embedding and no class token, and in place of normalization based on batch statistics it uses a learnable affine operator that only rescales and shifts its input element-wise.

On ImageNet, the paper reports that ResMLP's trade-off between accuracy, FLOPs and throughput is not as good as that of convolutional networks or Transformers, and argues that its accuracy still suggests the layer design's structural constraints do not have a drastic influence on performance. It also finds that ResMLP greatly benefits from distillation from a convnet, as DeiT models do.

Key idea. The paper shows that a residual network built only from linear layers and GELU, given a modern training strategy, attains good accuracy/complexity trade-offs on ImageNet.

  • ResMLP
  • residual MLP
  • all-MLP image classifier
  • feedforward network
  • image classification
  • ImageNet
  • timm
  • residual multi-layer perceptrons

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.