MLP-Mixer in Keras
This is a simple keras implementation of MLP-Mixer. MLP-Mixer is an almost exclusivly multi-layer perceptions approach to vision like tasks.
Install
$ pip install mlp-mixer-keras
Example usage
from mlp_mixer_keras import MlpMixerModel
import numpy as np
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()
model = MlpMixerModel(input_shape=x_train.shape[1:],
num_classes=len(np.unique(y_train)),
num_blocks=4,
patch_size=8,
hidden_dim=32,
tokens_mlp_dim=64,
channels_mlp_dim=128,
use_softmax=True)
model.compile(loss='sparse_categorical_crossentropy', metrics='acc')
model.fit(x_train, y_train, validation_data=(x_test, y_test))
References
MLP-Mixer: An all-MLP Architecture for Vision
Ilya Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, Alexey Dosovitskiy, MLP-Mixer: An all-MLP Architecture for Vision
@misc{tolstikhin2021mlpmixer,
title={MLP-Mixer: An all-MLP Architecture for Vision},
author={Ilya Tolstikhin and Neil Houlsby and Alexander Kolesnikov and Lucas Beyer and Xiaohua Zhai and Thomas Unterthiner and Jessica Yung and Daniel Keysers and Jakob Uszkoreit and Mario Lucic and Alexey Dosovitskiy},
year={2021},
eprint={2105.01601},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
MLP-Mixer: An all-MLP Architecture for Vision (Machine Learning Research Paper Explained)
Excellent Yannic Kilcher explainer video.
MLP Mixer - Pytorch
A pytorch implementation of MLP-Mixer. This repo helped a alot as I learned the ways of making a nice github repo for a project.
Phil Wang - lucidrains
Metadata
Release files for mlp-mixer-keras 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mlp-mixer-keras-0.0.5.tar.gz | 4.4 kB | Without provenance | Details for mlp-mixer-keras-0.0.5.tar.gz |
Release files / mlp-mixer-keras-0.0.5.tar.gz
| Download URL | mlp-mixer-keras-0.0.5.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac02cf51c95105440f594304c3d4dfea71b725455ecf9764437d8e7300d5cfdd
|
|
BLAKE2b-256 checksum How to use checksums |
4388bd2f0a5d12ba8f3e465c015b2aca86783d2d16e708491c575bc7ab35b127
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
|
Security for mlp-mixer-keras 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.