Skip to main content

The unofficial implementation of MLP Mixer by Tolstikhin, Houlsby, Kolesnikov, Beyer et all based on the official JAX implementation.

Project description

MLP Mixer

The unofficial implementation of MLP Mixer by Tolstikhin, Houlsby, Kolesnikov, Beyer et all based on the official JAX implementation.

Installation

You can install this package using pip simply by running following command.

pip install mixers

Usage

import torch
from mixers import MLPMixer

images = torch.randn(1, 3, 224, 224)
classifier = MLPMixer(
        num_classes = 10,
        num_blocks = 5,
        hidden_dimension = 512,
        tokens_mlp_dimension = 128,
        channels_mlp_dimension = 128,
        patch_size = 16,
        image_size = 224
)

print(classifier(images))

Citation

@misc{tolstikhin_mlp-mixer_2021, title = {{MLP}-{Mixer}: {An} all-{MLP} {Architecture} for {Vision}}, shorttitle = {{MLP}-{Mixer}}, url = {http://arxiv.org/abs/2105.01601}, doi = {10.48550/arXiv.2105.01601}, urldate = {2025-11-20}, publisher = {arXiv}, author = {Tolstikhin, Ilya and Houlsby, Neil and Kolesnikov, Alexander and Beyer, Lucas and Zhai, Xiaohua and Unterthiner, Thomas and Yung, Jessica and Steiner, Andreas and Keysers, Daniel and Uszkoreit, Jakob and Lucic, Mario and Dosovitskiy, Alexey}, month = jun, year = {2021}, note = {arXiv:2105.01601 [cs]}, keywords = {Computer Science - Computer Vision and Pattern Recognition, Computer Science - Machine Learning, Computer Science - Artificial Intelligence}, }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixers-0.0.11.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mixers-0.0.11-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file mixers-0.0.11.tar.gz.

File metadata

  • Download URL: mixers-0.0.11.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mixers-0.0.11.tar.gz
Algorithm Hash digest
SHA256 fe5636e0798756060d8afe14e4556234cd658aa2145e594d96ead3d4a4bca231
MD5 28b4a2411917448a26e9b9071188c7bd
BLAKE2b-256 1eb9874c616b369f9dff74663593aaa1a79457e03181fbc0bef2f3bcb58659ce

See more details on using hashes here.

File details

Details for the file mixers-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: mixers-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mixers-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 4adc33e5b0e76cfbfd16566b0cde3248c40b9e2d786d505d7bc6743fa4387c38
MD5 0222ddeada93783021df635b360c39f4
BLAKE2b-256 a2829c0f718a333064e97285b2afa4ba4e54a009a60a9b5bc191161738464c3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page