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
PyTorch implementation(s) of various ResNet models from Twitch streams.

pytorch-resnet-twitch PyTorch implementation(s) of various ResNet models from Twitch streams. Status: ResNet50 currently not working. Will update in n

Daniel Bourke 3 Jan 11, 2022
Runtime type annotations for the shape, dtype etc. of PyTorch Tensors.

torchtyping Type annotations for a tensor's shape, dtype, names, ... Turn this: def batch_outer_product(x: torch.Tensor, y: torch.Tensor) - torch.Ten

Patrick Kidger 1.2k Jan 03, 2023
This is the official implementation of the paper "Object Propagation via Inter-Frame Attentions for Temporally Stable Video Instance Segmentation".

[CVPRW 2021] - Object Propagation via Inter-Frame Attentions for Temporally Stable Video Instance Segmentation

Anirudh S Chakravarthy 6 May 03, 2022
An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models.

An optimization and data collection toolbox for convenient and fast prototyping of computationally expensive models. Hyperactive: is very easy to lear

Simon Blanke 422 Jan 04, 2023
This GitHub repository contains code used for plots in NeurIPS 2021 paper 'Stochastic Multi-Armed Bandits with Control Variates.'

About Repository This repository contains code used for plots in NeurIPS 2021 paper 'Stochastic Multi-Armed Bandits with Control Variates.' About Code

Arun Verma 1 Nov 09, 2021
[ICCV 2021 Oral] SnowflakeNet: Point Cloud Completion by Snowflake Point Deconvolution with Skip-Transformer

This repository contains the source code for the paper SnowflakeNet: Point Cloud Completion by Snowflake Point Deconvolution with Skip-Transformer (ICCV 2021 Oral). The project page is here.

AllenXiang 65 Dec 26, 2022
Utilities and information for the signals.numer.ai tournament

dsignals Utilities and information for the signals.numer.ai tournament using eodhistoricaldata.com eodhistoricaldata.com provides excellent historical

Degerhan Usluel 23 Dec 18, 2022
Unofficial pytorch implementation of paper "One-Shot Free-View Neural Talking-Head Synthesis for Video Conferencing"

One-Shot Free-View Neural Talking Head Synthesis Unofficial pytorch implementation of paper "One-Shot Free-View Neural Talking-Head Synthesis for Vide

ZLH 406 Dec 23, 2022
Deep Hedging Demo - An Example of Using Machine Learning for Derivative Pricing.

Deep Hedging Demo Pricing Derivatives using Machine Learning 1) Jupyter version: Run ./colab/deep_hedging_colab.ipynb on Colab. 2) Gui version: Run py

Yu Man Tam 102 Jan 06, 2023
Collection of NLP model explanations and accompanying analysis tools

Thermostat is a large collection of NLP model explanations and accompanying analysis tools. Combines explainability methods from the captum library wi

126 Nov 22, 2022
Implementation of SETR model, Original paper: Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers.

SETR - Pytorch Since the original paper (Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers.) has no official

zhaohu xing 112 Dec 16, 2022
A scikit-learn-compatible module for estimating prediction intervals.

MAPIE - Model Agnostic Prediction Interval Estimator MAPIE allows you to easily estimate prediction intervals (or prediction sets) using your favourit

588 Jan 04, 2023
Image reconstruction done with untrained neural networks.

PyTorch Deep Image Prior An implementation of image reconstruction methods from Deep Image Prior (Ulyanov et al., 2017) in PyTorch. The point of the p

Atiyo Ghosh 192 Nov 30, 2022
[CVPR 2022] Official PyTorch Implementation for "Reference-based Video Super-Resolution Using Multi-Camera Video Triplets"

Reference-based Video Super-Resolution (RefVSR) Official PyTorch Implementation of the CVPR 2022 Paper Project | arXiv | RealMCVSR Dataset This repo c

Junyong Lee 151 Dec 30, 2022
SASM - simple crossplatform IDE for NASM, MASM, GAS and FASM assembly languages

SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SA

Dmitriy Manushin 5.6k Jan 06, 2023
Open-Domain Question-Answering for COVID-19 and Other Emergent Domains

Open-Domain Question-Answering for COVID-19 and Other Emergent Domains This repository contains the source code for an end-to-end open-domain question

7 Sep 27, 2022
AQP is a modular pipeline built to enable the comparison and testing of different quality metric configurations.

Audio Quality Platform - AQP An Open Modular Python Platform for Objective Speech and Audio Quality Metrics AQP is a highly modular pipeline designed

Jack Geraghty 24 Oct 01, 2022
Range Image-based LiDAR Localization for Autonomous Vehicles Using Mesh Maps

Range Image-based 3D LiDAR Localization This repo contains the code for our ICRA2021 paper: Range Image-based LiDAR Localization for Autonomous Vehicl

Photogrammetry & Robotics Bonn 208 Dec 15, 2022
Python Actor concurrency library

Thespian Actor Library This library provides the framework of an Actor model for use by applications implementing Actors. Thespian Site with Documenta

Kevin Quick 177 Dec 11, 2022
It helps user to learn Pick-up lines and share if he has a better one

Pick-up-Lines-Generator(Open Source) It helps user to learn Pick-up lines Share and Add one or many to the DataBase Unique SQLite DataBase AI Undercon

knock_nott 0 May 04, 2022