Skip to main content

Unofficial JAX implementations of deep learning research papers

Project description

JAX Models

license-shield

release-shield

python-shield

code-style

Table 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 Project

The JAX Models repository 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 on Papers With Code.


Available model implementations for JAX are:

  1. MetaFormer is Actually What You Need for Vision (Weihao Yu et al., 2021)

  2. Augmenting Convolutional networks with attention-based aggregation (Hugo Touvron et al., 2021)

  3. MPViT : Multi-Path Vision Transformer for Dense Prediction (Youngwan Lee et al., 2021)

  4. MLP-Mixer: An all-MLP Architecture for Vision (Ilya Tolstikhin et al., 2021)

  5. Patches Are All You Need (Anonymous et al., 2021)

  6. SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers (Enze Xie et al., 2021)

  7. A ConvNet for the 2020s (Zhuang Liu et al., 2021)

  8. Masked Autoencoders Are Scalable Vision Learners (Kaiming He et al., 2021)

  9. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (Ze Liu et al., 2021)

  10. Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions (Wenhai Wang et al., 2021)

  11. Going deeper with Image Transformers (Hugo Touvron et al., 2021)

  12. Visual Attention Network (Meng-Hao Guo et al., 2022)


Available layers for out-of-the-box integration:

  1. DropPath (Stochastic Depth) (Gao Huang et al., 2021)

  2. Squeeze-and-Excitation Layer (Jie Hu et al. 2019)

  3. Depthwise Convolution (François Chollet, 2017)

Prerequisites

Prerequisites can be installed separately through the requirements.txt file in the main directory using:

pip install -r requirements.txt

The use of a virtual environment is highly recommended to avoid version incompatibilites.

Installation

This project is built with Python 3 for the latest JAX/Flax versions and can be directly installed via pip.

pip install jax-models

If you wish to use the latest version then you can directly clone the repository too.

git clone https://github.com/DarshanDeshpande/jax-models.git

Usage

To see all model architectures available:

from jax_models import list_models

from pprint import pprint



pprint(list_models())

To load your desired model:

from jax_models import load_model

load_model('swin-tiny-224', attach_head=True, num_classes=1000, dropout=0.0, pretrained=True)

Note: It is necessary to pass attach_head=True and num_classes while loading pretrained models.

Contributing

Please raise an issue if any implementation gives incorrect results, crashes unexpectedly during training/inference or if any citation is missing.

You can contribute to jax_models by 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 mail here.


License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Contact

Feel free to reach out for any issues or requests related to these implementations

Darshan Deshpande - Email | Twitter | LinkedIn

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

jax_models-0.0.5.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

jax_models-0.0.5-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file jax_models-0.0.5.tar.gz.

File metadata

  • Download URL: jax_models-0.0.5.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for jax_models-0.0.5.tar.gz
Algorithm Hash digest
SHA256 fa287d315abdadd8320cda4571f41719fef76c32fca4e0b815ed0b110388209d
MD5 baa5b07523240f6481b0292a72b792f3
BLAKE2b-256 7fac6ceb15fec6b329717e125fd714f479400d3542d52e6913a020cf77d86e64

See more details on using hashes here.

File details

Details for the file jax_models-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: jax_models-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 46.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for jax_models-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 42de33bbd3cb2dbf24dfbf662af9a0f8c0b6b38cf0b20df20d365bf639b529d1
MD5 d077a94f6fee006cd5378ad7d737a507
BLAKE2b-256 1d8072d0e626af62eea972fa127b75fd58cffb13add076df69edd0118282601e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page