Proyectos
Ver en GitHub
rishikksh20/MLP-Mixer-pytorch
Acerca de
Unofficial implementation of MLP-Mixer: An all-MLP Architecture for Vision
IA y aprendizaje automáticoCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalMLP-Mixer: An all-MLP Architecture for Vision
This repo contains PyTorch implementation of MLP-Mixer: An all-MLP Architecture for Vision.
Usage :
import torch
import numpy as np
from mlp-mixer import MLPMixer
img = torch.ones([1, 3, 224, 224])
model = MLPMixer(in_channels=3, image_size=224, patch_size=16, num_classes=1000,
dim=512, depth=8, token_dim=256, channel_dim=2048)
parameters = filter(lambda p: p.requires_grad, model.parameters())
parameters = sum([np.prod(p.size()) for p in parameters]) / 1_000_000
print('Trainable Parameters: %.3fM' % parameters)
out_img = model(img)
print("Shape of out :", out_img.shape) # [B, in_channels, image_size, image_size]
Citation :
@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}
}
Acknowledgement :
- Some component borrowed from ViT code of @lucidrains repo : https://github.com/lucidrains/vit-pytorch
Explorar proyectos relacionados
Cargando…