• Stars
    star
    150
  • Rank 245,852 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Unofficial JAX implementations of deep learning research papers

JAX Models

license-shield release-shield python-shield code-style

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact

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

More Repositories

1

Scrapera

A universal package of scraper scripts for humans
Python
309
star
2

tf-madgrad

A tf.keras implementation of Facebook AI's MadGrad optimization algorithm
Python
21
star
3

research-paper-implementations

Open Sourced ML Research Paper Implementations in Tensorflow
Python
19
star
4

COVID-19-Detector

Diagnosing COVID-19 patients through X-Rays
Jupyter Notebook
17
star
5

tfrecord-generator

This repository contains scripts for conversion of data required for most commonly found Machine Learning tasks to TFRecords
Python
13
star
6

audio-spectral-enhancement

Tensorflow Implementation of Audio Spectral Enhancement: Leveraging Autoencoders for Low Latency Reconstruction of Long, Lossy Audio Sequences (Darshan Deshpande and Harshavardhan Abichandani, 2021)
Python
5
star
7

Instagram-Bot-Reporter

๐Ÿค– Machine Learning and Automation Against Unsolicited Bots on Instagram
Python
3
star
8

Miscellaneous-Deep-Learning-Projects

Starter notebooks for Deep Learning enthusiasts
Jupyter Notebook
2
star
9

Conversational-AI-Chatbot

Transformer based sequence model for contextual conversation generation
Jupyter Notebook
1
star
10

Face-Detection

This is an extension to the face_recognition library by ageitgey
Python
1
star
11

complex-optimization

Tensorflow examples demonstrating advantages of complex variable optimization
Jupyter Notebook
1
star
12

Speech-Recognition

A speech recognition model using a three layered Conv1D neural network made for Tensorflow's Speech Recognition Kaggle Challenge
Jupyter Notebook
1
star
13

Research-With-TF

๐Ÿš€ Implementation of my research ideas
Jupyter Notebook
1
star