Google Article
Introducing TensorFlow Addons
July 23, 2019
Posted by Sean Morgan (Two Six Labs), Yan Facai (Alibaba), Moritz Kröger (RWTH Aachen University), Tzu-Wei Sung (National Taiwan University), Dheeraj Rajaram Reddy (Manipal University)

SIG Addons TensorFlow

What is SIG Addons?

With the introduction of TensorFlow 2.0, we’ve created a new Special Interest Group (SIG) known as TensorFlow Addons. This group governs a repository of contributions that conform to well-established API patterns, but implement new functionality not available in core TensorFlow. As an example these new functionalities may be new algorithms from published papers or missing functionality for data preprocessing and filtering. Check it out on Github: https://github.com/tensorflow/addons

As a community managed SIG, Addons enables users to introduce new extensions to the TensorFlow eco-system in a sustainable manner. The repository follows a modular approach with subpackages and submodules who are maintained by designated community members. As of today, these subpackages include:
  • tfa.activations
  • tfa.callbacks
  • tfa.image
  • tfa.layers
  • tfa.losses
  • tfa.metrics
  • tfa.optimizers
  • tfa.rnn
  • tfa.seq2seq
  • tfa.text
Another aim of the TensorFlow Addons community is to provide documentation and examples for all functionalities through Google Colab Notebooks. This will help new developers and machine learning enthusiasts to not only understand the functions but will also provide them with best practice approaches and implementation examples.

TensorFlow Addons uses four platforms for organization and communication:

Moving from tf.contrib

The project’s objective may sound quite familiar, and Addons is indeed the landing place for much of tf.contrib which has been moved out of the central TensorFlow repository. Over the past few years, a lot of code in tf.contrib became stale, unmaintained, complicated, and very difficult to use because of documentation. A lot of custom API’s got created in this tf.contrib which made it even harder to integrate this functionality into your code. By moving the most relevant algorithms into TensorFlow-Addons and cleaning them up, much of the code you used in tf.contrib will be available in addons as well. Additionally, a lot of new functionality is already part of the TF-Addons and there is much more planned.

How to Install

TensorFlow Addons provides a pip package for macOS and Linux, with plans to support Windows and Anaconda in the future. Try it today on the most recent release of tensorflow-2.0:

pip install tensorflow-addons

To use TensorFlow-addons in your Python code you can simply import the package with:

import tensorflow as tf

import tensorflow_addons as tfa

Repository Sustainability

To ensure that TensorFlow Addons does not become a stale code grave, subpackage and submodule maintainers were introduced to govern parts of the repository. These maintainers have the following responsibilities:
  • Periodically review and deprecate old and unused code
  • Manage graduate candidates for TensorFlow Core
  • Ensure API conformity and test/code quality
  • Manage Issues
  • Review Changes
More information on the specifics of the proxy maintainer system can be found in the recently accepted RFC on Addons sustainability:

https://github.com/tensorflow/community/blob/master/rfcs/20190308-addons-proxy-maintainership.md

We hope that the introduction of maintainers and periodic reviews will preserve the quality of this repository, making TensorFlow Addons a well known and useable part of the TensorFlow ecosystem for years to come.

How To Contribute

Contributing to TensorFlow Addons is a great way to keep yourself familiar with recent advances in the field of ML, as well as a means to familiarize yourself with TF2 best practices.

A good start for new contributors is to read the CONTRIBUTING.md doc in the TensorFlow Addons GitHub repository. This document explains the review process, coding style, and how to set up your development environment. After familiarizing yourself with the general structure of this repository you can look into the issue section and pick an issue you would like to work on. Issues labeled help wanted and good first issue are a great place to start. We also encourage contributions of examples and best practices which can be made using Google Colab.

Please leave a comment at the corresponding issue or open up a new issue before you start working to avoid multiple contributions or work that doesn’t align with the roadmap. After that, just fork the Addons repository, implement your code and open a pull request once you are done. One of the maintainers will review your changes and merge them into the master branch once they are complete.

TFA Example

See how to seamlessly integrate addons with core TensorFlow:

https://github.com/tensorflow/addons/blob/master/examples/losses_triplet.ipynb
Next post
Introducing TensorFlow Addons

Posted by Sean Morgan (Two Six Labs), Yan Facai (Alibaba), Moritz Kröger (RWTH Aachen University), Tzu-Wei Sung (National Taiwan University), Dheeraj Rajaram Reddy (Manipal University)


What is SIG Addons?With the introduction of TensorFlow 2.0, we’ve created a new Special Interest Group (SIG) known as TensorFlow Addons. This group governs a repository of contributions that conform to well-establis…