Code Monkey home page Code Monkey logo

memory's Introduction

image

image



End-to-end memory modules for machine learning developers, written in Ivy.

Contents

Overview

What is Ivy Memory?

Ivy memory provides differentiable memory modules, including learnt modules such as Neural Turing Machines (NTM), but also parameter-free modules such as End-to-End Egospheric Spatial Memory (ESM). Check out the docs for more info!

The library is built on top of the Ivy machine learning framework. This means all memory modules simultaneously support: Jax, Tensorflow, PyTorch, MXNet, and Numpy.

Ivy Libraries

There are a host of derived libraries written in Ivy, in the areas of mechanics, 3D vision, robotics, gym environments, neural memory, pre-trained models + implementations, and builder tools with trainers, data loaders and more. Click on the icons below to learn more!


Quick Start

Ivy memory can be installed like so: pip install ivy-memory==0.0.1.post0

To quickly see the different aspects of the library, we suggest you check out the demos! We suggest you start by running the script run_through.py, and read the "Run Through" section below which explains this script.

For more interactive demos, we suggest you run either learning_to_copy_with_ntm.py or mapping_a_room_with_esm.py in the interactive demos folder.

Run Through

We run through some of the different parts of the library via a simple ongoing example script. The full script is available in the demos folder, as file run_through.py.

End-to-End Egospheric Spatial Memory

First, we show how the Ivy End-to-End Egospheric Spatial Memory (ESM) class can be used inside a pure-Ivy model. We first define the model as below.

Next, we instantiate this model, and verify that the returned tensors are of the expected shape.

Finally, we define a dummy loss function, and show how the ESM network can be trained using Ivy functions only.

Neural Turing Machine

We next show how the Ivy Neural Turing Machine (NTM) class can be used inside a TensorFlow model. First, we define the model as below.

Next, we instantiate this model, and verify that the returned tensors are of the expected shape.

Finally, we define a dummy loss function, and show how the NTM can be trained using a native TensorFlow optimizer.

Interactive Demos

In addition to the run through above, we provide two further demo scripts, which are more visual and interactive.

The scripts for these demos can be found in the interactive demos folder.

Learning to Copy with NTM

The first demo trains a Neural Turing Machine to copy a sequence from one memory bank to another. NTM can overfit to a single copy sequence very quickly, as show in the real-time visualization below.

Mapping a Room with ESM

The second demo creates an egocentric map of a room, from a rotating camera. The raw image observations are shown on the left, and the incrementally constructed omni-directional ESM feature and depth images are shown on the right. While this example only projects color values into the memory, arbitrary neural network features can also be projected, for end-to-end training.

Get Involved

We hope the memory classes in this library are useful to a wide range of machine learning developers. However, there are many more areas of differentiable memory which could be covered by this library.

If there are any particular functions or classes you feel are missing, and your needs are not met by the functions currently on offer, then we are very happy to accept pull requests!

We look forward to working with the community on expanding and improving the Ivy memory library.

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}
}

memory's People

Contributors

aarsh2001 avatar bicycleman15 avatar bipinkrishnan avatar djl11 avatar fnhirwa avatar jindalai avatar juliagsy avatar kareemmax avatar kurshakuz avatar mattbarrett98 avatar selvaraj-sembulingam avatar sreegandh804 avatar vedpatwardhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.