Git Product home page Git Product logo

xfer's Introduction

Xfer

Deep Transfer Learning for MXNet


Build Status Documentation Status codecov pypi GitHub license

Website | Documentation | Contribution Guide

What is Xfer?

Xfer is a library that allows quick and easy transfer of knowledge1,2,3 stored in deep neural networks implemented in MXNet. Xfer can be used with data of arbitrary numeric format, and can be applied to the common cases of image or text data.

Xfer can be used as a pipeline that spans from extracting features to training a repurposer. The repurposer is then an object that carries out predictions in the target task.

You can also use individual components of Xfer as part of your own pipeline. For example, you can leverage the feature extractor to extract features from deep neural networks or ModelHandler, which allows for quick building of neural networks, even if you are not an MXNet expert.

Why should I use Xfer?

  • Resource efficiency: you don't have to train big neural networks from scratch.
  • Data efficiency: by transferring knowledge, you can classify complex data even if you have very few labels.
  • Easy access to neural networks: you don't need to be an ML ninja in order to leverage the power of neural networks. With Xfer you can easily re-use them or even modify existing architectures and create your own solution.
  • Utilities for feature extraction from neural networks.
  • Rapid prototyping: ModelHandler allows you to easily modify a neural network architecture, e.g. by providing one-liners for adding / removing / freezing layers.
  • Uncertainty modeling: With the Bayesian neural network (BNN) or the Gaussian process (GP) repurposers, you can obtain uncertainty in the predictions of the rerpurposer.

Minimal demo

After defining an MXNet source model and data iterators for your target task, you can perform transfer learning with just 3 lines of code:

repurposer = xfer.LrRepurposer(source_model, feature_layer_names=['fc7'])
repurposer.repurpose(train_iterator)
predictions = repurposer.predict_label(test_iterator)

Getting Started

Installation

  • Dependencies: Primary dependencies are MXNet >=1.2 and GPy >= 1.9.5. See all requirements in setup.py.

  • Supported architectures / versions: Python 3.6+ on MacOS and Amazon Linux.

    Also tested on Python 3.4 and 3.5. Kindly note that for these Python versions, NumPy must be pre-installed for GPy (dependency of Xfer) to work.

  • Install with pip:
pip install xfer-ml
  • Install from source: To install Xfer from source, after cloning the repository run the following from the top-level directory:
pip install .

To confirm installation, run:

>>> import xfer
>>> xfer.__version__

And confirm that version returned matches the expected package version number.

Contributing

Have a look at our contributing guide, thanks for the interest!

Points of contact for Xfer are: Jordan Massiah, Keerthana Elango, Pablo G. Moreno, Nikos Aletras, Andreas Damianou

License

Xfer is licensed under the Apache 2.0 License.

xfer's People

Contributors

jnkm avatar palindromik avatar hyandell avatar 0xflotus avatar adamian avatar

Watchers

liuqiang 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.