Skip to main content

The official implementation of MLP Mixer by Tolstikhin, Houlsby, Kolesnikov, Beyer et al.

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 image-mixer

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))

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.1.tar.gz (5.5 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.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mixers-0.0.1.tar.gz
  • Upload date:
  • Size: 5.5 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.1.tar.gz
Algorithm Hash digest
SHA256 bd1a1f7d94dadbce1aae825f345bdfda48ccbe6b5333d042d76924fcb9c9e8a7
MD5 e8ce72d17e4282b40f371e536fe4d69b
BLAKE2b-256 cfd46fe6d982c40a60e91f955eccf16dcabdd69c452ec0584abc21f4da5e3537

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mixers-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6749c54eccfd7e73271148b046c88894127c9f66ab0d53e453414d6496d71204
MD5 baebd27649eeca1b0ecdad3c8871a08b
BLAKE2b-256 13ed72b718faaec889f0e81b11a2e467c691b543d90846321a6397443154ef04

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