Ivy is a templated deep learning framework which maximizes the portability of deep learning codebases.

Overview



The templated deep learning framework, enabling framework-agnostic functions, layers and libraries.

Contents

Overview

What is Ivy?

Ivy is a templated deep learning framework which maximizes the portability of deep learning codebases. Ivy wraps the functional APIs of existing frameworks. Framework-agnostic functions, libraries and layers can then be written using Ivy, with simultaneous support for all frameworks. Ivy currently supports Jax, TensorFlow, PyTorch, MXNet and Numpy. Check out the docs for more info!

Ivy Libraries

There are a host of derived libraries written in Ivy, in the areas of mechanics, 3D vision, robotics, differentiable memory, and differentiable gym environments. Click on the icons below for their respective github pages.


Quick Start

Ivy can be installed like so: pip install ivy-core

To get started, you can immediately use ivy with your deep learning framework of choice. In the example below we show how ivy's concatenation function is compatible with tensors from different frameworks.

import jax.numpy as jnp
import tensorflow as tf
import numpy as np
import mxnet as mx
import torch

import ivy

jax_concatted = ivy.concatenate((jnp.ones((1,)), jnp.ones((1,))), -1)
tf_concatted = ivy.concatenate((tf.ones((1,)), tf.ones((1,))), -1)
np_concatted = ivy.concatenate((np.ones((1,)), np.ones((1,))), -1)
mx_concatted = ivy.concatenate((mx.nd.ones((1,)), mx.nd.ones((1,))), -1)
torch_concatted = ivy.concatenate((torch.ones((1,)), torch.ones((1,))), -1)

To see a list of all Ivy methods, type ivy. into a python command prompt and press tab. You should then see output like the following:

docs/partial_source/images/ivy_tab.png

Based on this short code sample alone, you may wonder, why is this helpful? Don't most developers stick to just one framework for a project? This is indeed the case, and the benefit of Ivy is not the ability to combine different frameworks in a single project.

So what is the benefit of Ivy?

In a Nutshell

Ivy's strength arises when we want to maximize the usability of our code.

We can write a set of functions once in Ivy, and share these with the community so that all developers can use them, irrespective of their personal choice of framework. TensorFlow? PyTorch? Jax? With Ivy functions it doesn't matter!

This makes it very simple to create highly portable deep learning codebases. The core idea behind Ivy is captured by the example of the ivy.clip function below.

On it's own this may not seem very exciting, there are more interesting things to do in deep learning than clip tensors. Ivy is a building block for more interesting applications.

For example, the Ivy libraries for mechanics, 3D vision, robotics, and differentiable environments are all written in pure Ivy. These libraries provide fully differentiable implementations of various applied functions, primed for integration in end-to-end networks, for users of any deep-learning framework.

Another benefit of Ivy is user flexibility. By keeping the Ivy abstraction lightweight and fully functional, this keeps you in full control of your code. The schematic below emphasizes that you can choose to develop at any abstraction level.

You can code entirely in Ivy, or mainly in their native DL framework, with a small amount of Ivy code. This is entirely up to you, depending on how many Ivy functions you need from existing Ivy libraries, and how much new Ivy code you add into your own project, to maximize it's audience when sharing online.

Where Next?

So, now that you've got the gist of Ivy, and why it's useful. Where to next?

This depends on whether you see yourself in the short term as more likely to be an Ivy library user or an Ivy library contributor.

If you would like to use the existing set of Ivy libraries, dragging and dropping key functions into your own project, then we suggest you dive into some of the demos for the various Ivy libraries currently on offer. Simply open up the main docs, then open the library-specific docs linked on the bottom left, and check out the demos folder in the library repo.

On the other hand, if you have your own new library in mind, or if you would like to implement parts of your own project in Ivy to maximise it's portability, then we recommend checking out the page Writing Ivy in the docs. Here, we dive a bit deeper into the Ivy framework, and the best coding practices to get the most out of Ivy for your own codebases and libraries.

Citation

@article{lenton2021ivy,
  title={Ivy: Templated Deep Learning for Inter-Framework Portability},
  author={Lenton, Daniel and Pardo, Fabio and Falck, Fabian and James, Stephen and Clark, Ronald},
  journal={arXiv preprint arXiv:2102.02886},
  year={2021}
}
Comments
  • Create numpy diagonal

    Create numpy diagonal

    diagonal #6616. Kindly mark a green circle on it. So there will be no conflict in the future. I already experienced that thing. https://github.com/unifyai/ivy/issues/6616.

    TensorFlow Frontend NumPy Frontend Array API Ivy Functional API 
    opened by hrak99 59
  • Add Statistical functions mean numpy frontend #2546

    Add Statistical functions mean numpy frontend #2546

    Greetings i think i did everything i did the frontend the tests as well and changed the init files i did the mean function according to the numpy documentation waiting for your reply. Best regards.

    opened by Emperor-WS 26
  • Isin extension

    Isin extension

    #5716

    added most backend implementations there is only problem with tensorflow I'm still trying to solve since it doesnt have the function isin, once I'm able to do that I will add tests

    Array API Function Reformatting Ivy Functional API Ivy API Experimental 
    opened by pillarxyz 20
  • reformat shape_to_tuple

    reformat shape_to_tuple

    Hi, I've got a question on testings. I was getting errors, so I checked the logs and I found out that some of those tests aren't ready yet (e.g.: shape_to_tuple). Not sure if I'm right, but it'll be awesome if you give some information about this. Thank you.

    opened by mcandemir 19
  • feat: add is_tensor to tensorflow frontend general functions

    feat: add is_tensor to tensorflow frontend general functions

    Close #7584 Need help with PyTest, I am unable to wrap my head around the testing helpers yet.

    Essentially, when I run these tests, I get the same error, despite trying various combinations of the parameters passed to the test_frontend_function

    TensorFlow Frontend 
    opened by chtnnh 18
  • argmax function: general.py

    argmax function: general.py

    Test Cases:

    • 42 passed for pytest ./ivy/ivy_tests/test_functional/test_core/test_general.py::test_argmax --disable-warnings -rs
    • 6 skipped for conftest.py
    • No errors

    Implemented for

    • [x] jax
    • [x] numpy
    • [x] mxnet
    • [x] tensorflow
    • [x] torch
    Array API Single Function 
    opened by 7wikd 18
  • Added PadV2 to raw_ops

    Added PadV2 to raw_ops

    Closes https://github.com/unifyai/ivy/issues/9394 Please that this PR is based on https://github.com/unifyai/ivy/pull/9461 as they have common functionality

    TensorFlow Frontend 
    opened by KareemMAX 0
Releases(v1.1.9)
  • v1.1.5(Jul 26, 2021)

    Version 1.1.5.

    Added some new methods and classes, improved the ivy.Module and ivy.Container classes. ivy.Container now overrides more built-in methods, and has more flexible nested methods such as gather_nd, repeat, stop_gradients etc.

    This version was tested against: JAX 0.2.17 JAXLib 0.1.69 TensorFlow 2.5.0 TensorFlow Addons 0.13.0 TensorFlow Probability 0.13.0 PyTorch 1.9.0 MXNet 1.8.0 NumPy 1.19.5

    However, Ivy 1.1.5 inevitably supports many previous and future backend versions, due to the stability of the core APIs for each backend framework.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.4(Apr 12, 2021)

    Version 1.1.4.

    Added some new methods, fixed some small bugs, improved unit testing, and tested against the latest backend versions.

    This version was tested against: JAX 0.2.12 TensorFlow 2.4.1 PyTorch 1.8.1 MXNet 1.8.0 NumPy 1.20.2

    However, Ivy 1.1.4 inevitably supports many previous and future backend versions, due to the stability of the core APIs for each backend framework.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.3(Mar 19, 2021)

    Version 1.1.3.

    Added some new methods, fixed some small bugs, improved unit testing, and tested against the latest backend versions.

    This version was tested against: JAX 0.2.10 TensorFlow 2.4.1 PyTorch 1.8.0 MXNet 1.7.0 NumPy 1.19.5

    However, Ivy 1.1.3 likely supports many previous and future backend versions, due to the stability of the core APIs for each backend framework.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Feb 27, 2021)

    Version 1.1.2.

    Added adam update, changed gradient methdos to operate on gradient dicts instead of lists, added new container chain chain method, among other small changes.

    This version was tested against: JAX 0.2.9 TensorFlow 2.4.1 PyTorch 1.7.1 MXNet 1.7.0 NumPy 1.19.5

    However, Ivy 1.1.2 likely supports many previous and future backend versions, due to the stability of the core APIs for each backend framework.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Feb 10, 2021)

Owner
Ivy
The Templated Deep Learning Framework
Ivy
Posterior predictive distributions quantify uncertainties ignored by point estimates.

Posterior predictive distributions quantify uncertainties ignored by point estimates.

DeepMind 177 Dec 06, 2022
YOLOX + ROS(1, 2) object detection package

YOLOX + ROS(1, 2) object detection package

Ar-Ray 158 Dec 21, 2022
The source code for Generating Training Data with Language Models: Towards Zero-Shot Language Understanding.

SuperGen The source code for Generating Training Data with Language Models: Towards Zero-Shot Language Understanding. Requirements Before running, you

Yu Meng 38 Dec 12, 2022
Quick program made to generate alpha and delta tables for Hidden Markov Models

HMM_Calc Functions for generating Alpha and Delta tables from a Hidden Markov Model. Parameters: a: Matrix of transition probabilities. a[i][j] = a_{i

Adem Odza 1 Dec 04, 2021
Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.

SymEngine Python Wrappers Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library. Installation Pip See License section

136 Dec 28, 2022
Implementation of ICLR 2020 paper "Revisiting Self-Training for Neural Sequence Generation"

Self-Training for Neural Sequence Generation This repo includes instructions for running noisy self-training algorithms from the following paper: Revi

Junxian He 45 Dec 31, 2022
Metric learning algorithms in Python

metric-learn: Metric Learning in Python metric-learn contains efficient Python implementations of several popular supervised and weakly-supervised met

1.3k Jan 02, 2023
Official PyTorch implementation of our AAAI22 paper: TransMEF: A Transformer-Based Multi-Exposure Image Fusion Framework via Self-Supervised Multi-Task Learning. Code will be available soon.

Official-PyTorch-Implementation-of-TransMEF Official PyTorch implementation of our AAAI22 paper: TransMEF: A Transformer-Based Multi-Exposure Image Fu

117 Dec 27, 2022
HINet: Half Instance Normalization Network for Image Restoration

HINet: Half Instance Normalization Network for Image Restoration Liangyu Chen, Xin Lu, Jie Zhang, Xiaojie Chu, Chengpeng Chen Paper: https://arxiv.org

303 Dec 31, 2022
QSYM: A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing

QSYM: A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing Environment Tested on Ubuntu 14.04 64bit and 16.04 64bit Installation # disabl

gts3.org (<a href=[email protected])"> 581 Dec 30, 2022
wgan, wgan2(improved, gp), infogan, and dcgan implementation in lasagne, keras, pytorch

Generative Adversarial Notebooks Collection of my Generative Adversarial Network implementations Most codes are for python3, most notebooks works on C

tjwei 1.5k Dec 16, 2022
Complete system for facial identity system. Include one-shot model, database operation, features visualization, monitoring

Complete system for facial identity system. Include one-shot model, database operation, features visualization, monitoring

2 Dec 28, 2021
Lava-DL, but with PyTorch-Lightning flavour

Deep learning project seed Use this seed to start new deep learning / ML projects. Built in setup.py Built in requirements Examples with MNIST Badges

Sami BARCHID 4 Oct 31, 2022
A Traffic Sign Recognition Project which can help the driver recognise the signs via text as well as audio. Can be used at Night also.

Traffic-Sign-Recognition In this report, we propose a Convolutional Neural Network(CNN) for traffic sign classification that achieves outstanding perf

Mini Project 64 Nov 19, 2022
Continuous Query Decomposition for Complex Query Answering in Incomplete Knowledge Graphs

Continuous Query Decomposition This repository contains the official implementation for our ICLR 2021 (Oral) paper, Complex Query Answering with Neura

UCL Natural Language Processing 71 Dec 29, 2022
Contrastive Learning with Non-Semantic Negatives

Contrastive Learning with Non-Semantic Negatives This repository is the official implementation of Robust Contrastive Learning Using Negative Samples

39 Jul 31, 2022
Non-stationary GP package written from scratch in PyTorch

NSGP-Torch Examples gpytorch model with skgpytorch # Import packages import torch from regdata import NonStat2D from gpytorch.kernels import RBFKernel

Zeel B Patel 1 Mar 06, 2022
[ICCV 2021 Oral] NerfingMVS: Guided Optimization of Neural Radiance Fields for Indoor Multi-view Stereo

NerfingMVS Project Page | Paper | Video | Data NerfingMVS: Guided Optimization of Neural Radiance Fields for Indoor Multi-view Stereo Yi Wei, Shaohui

Yi Wei 369 Dec 24, 2022
Code repository for "Reducing Underflow in Mixed Precision Training by Gradient Scaling" presented at IJCAI '20

Reducing Underflow in Mixed Precision Training by Gradient Scaling This project implements the gradient scaling method to improve the performance of m

Ruizhe Zhao 5 Apr 14, 2022
Code for our SIGCOMM'21 paper "Network Planning with Deep Reinforcement Learning".

0. Introduction This repository contains the source code for our SIGCOMM'21 paper "Network Planning with Deep Reinforcement Learning". Notes The netwo

NetX Group 68 Nov 24, 2022