keras-team / tf-keras

The TensorFlow-specific implementation of the Keras API, which was the default Keras from 2019 to 2023.
Apache License 2.0
64 stars 30 forks source link

Add MLP-Mixer models `keras.applications` #109

Open sayakpaul opened 2 years ago

sayakpaul commented 2 years ago

If you open a GitHub issue, here is our policy:

It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead). The form below must be filled out.

Here's why we have that policy:.

Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.

System information.

TensorFlow version (you are using): 2.8.0 Are you willing to contribute it (Yes/No) : Yes

Describe the feature and the current behavior/state.

I propose to introduce the MLP-Mixer models (MLP-Mixer: An all-MLP Architecture for Vision) to allow the community to investigate isotropic vision architectures that do not use any convolutions. In fact, as the name suggests, MLP-Mixers only use fully-connected layers with no other specialized blocks like self-attention.

While they don't attain SoTA performance on ImageNet-1k but they do attain baseline performance on it and show good scaling properties with performance efficiency.

Will this change the current api? How?

It will introduce APIs like MLPMixerB16, MLPMixerB32, MLPMixerL16.

Who will benefit from this feature?

Computer vision community, especially researchers willing to push the boundaries of what is doable with isotropic architectures.

Contributing

@fchollet @LukeWood

sushreebarsa commented 2 years ago

@sayakpaul Could you please elaborate about your feature and please specify the use cases for this feature. Thank you!

sayakpaul commented 2 years ago
sayakpaul commented 2 years ago

@LukeWood a gentle ping 👀

LukeWood commented 2 years ago

@LukeWood a gentle ping 👀

Hey Sayak! via an offline chat, we have discussed that this has a performance benefit in terms of FLOPs over convnets. As such, this is a solid candidate for inclusion. I will be migrating many kears.applications -> keras_cv.applications and making some breaking API changes in the process.

Let's wait for me to do one application, then we can route a PR for this there.