Package: jax-models
JAX ModelsTable of Contents<li>

  <a href="#about-the-project">About The Project</a>

</li>

<li>

  <a href="#getting-started">Getting Started</a>

  <ul>

    <li><a href="#prerequisites">Prerequisites</a></li>

    <li><a href="#installation">Installation</a></li>

    <li><a href="#usage">Usage</a></li>

  </ul>

</li>

<li><a href="#contributing">Contributing</a></li>

<li><a href="#license">License</a></li>

<li><a href="#contact">Contact</a></li>About The ProjectTheJAX Modelsrepository aims to provide open sourced JAX/Flax implementations for research papers originally without code or code written with frameworks other than JAX. The goal of this project is to make a collection of models, layers, activations and other utilities that are most commonly used for research. All papers and derived or translated code is cited in either the README or the docstrings. If you think that any citation is missed then please raise an issue.All implementations provided here are available onPapers With Code.Available model implementations for JAX are:MetaFormer is Actually What You Need for Vision(Weihao Yu et al., 2021)Augmenting Convolutional networks with attention-based aggregation(Hugo Touvron et al., 2021)MPViT : Multi-Path Vision Transformer for Dense Prediction(Youngwan Lee et al., 2021)MLP-Mixer: An all-MLP Architecture for Vision(Ilya Tolstikhin et al., 2021)Patches Are All You Need(Anonymous et al., 2021)SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers(Enze Xie et al., 2021)A ConvNet for the 2020s(Zhuang Liu et al., 2021)Masked Autoencoders Are Scalable Vision Learners(Kaiming He et al., 2021)Swin Transformer: Hierarchical Vision Transformer using Shifted Windows(Ze Liu et al., 2021)Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions(Wenhai Wang et al., 2021)Going deeper with Image Transformers(Hugo Touvron et al., 2021)Visual Attention Network(Meng-Hao Guo et al., 2022)Available layers for out-of-the-box integration:DropPath (Stochastic Depth)(Gao Huang et al., 2021)Squeeze-and-Excitation Layer(Jie Hu et al. 2019)Depthwise Convolution(François Chollet, 2017)PrerequisitesPrerequisites can be installed separately through therequirements.txtfile in the main directory using:pipinstall-rrequirements.txtThe use of a virtual environment is highly recommended to avoid version incompatibilites.InstallationThis project is built with Python 3 for the latest JAX/Flax versions and can be directly installed via pip.pipinstalljax-modelsIf you wish to use the latest version then you can directly clone the repository too.gitclonehttps://github.com/DarshanDeshpande/jax-models.gitUsageTo see all model architectures available:fromjax_modelsimportlist_modelsfrompprintimportpprintpprint(list_models())To load your desired model:fromjax_modelsimportload_modelload_model('swin-tiny-224',attach_head=True,num_classes=1000,dropout=0.0,pretrained=True)Note: It is necessary to passattach_head=Trueandnum_classeswhile loading pretrained models.ContributingPlease raise an issue if any implementation gives incorrect results, crashes unexpectedly during training/inference or if any citation is missing.You can contribute tojax_modelsby supporting me with compute resources or by contributing your own resources to provide pretrained weights.If you wish to donate to this inititative then please drop me a mailhere.LicenseDistributed under the Apache 2.0 License. SeeLICENSEfor more information.ContactFeel free to reach out for any issues or requests related to these implementationsDarshan Deshpande -Email|Twitter|LinkedIn