The Future of TensorFlow Addons

import tensorflow as tf
import tensorflow_addons as tfa
train,test = tf.keras.datasets.mnist.load_data()
x_train, y_train = train
x_train = x_train[..., tf.newaxis] / 255.0

# TFA layers and activations
model = tf.keras.Sequential([
  tf.keras.layers.Conv2D(filters=10, kernel_size=(3,3),
                         activation=tfa.activations.gelu),
  tfa.layers.GroupNormalization(groups=5, axis=3),
  tf.keras.layers.Flatten(),
  tf.keras.layers.Dense(10, activation='softmax')
])

# TFA optimizers, losses and metrics
model.compile(
    optimizer=tfa.optimizers.RectifiedAdam(0.001),
    loss=tfa.losses.TripletSemiHardLoss(),
    metrics=[tfa.metrics.MultiLabelConfusionMatrix(num_classes=10)])

history = model.fit(x_train, y_train, epochs=10)

TensorFlow Addons (TFA) is a repository of community maintained and contributed extensions for TensorFlow, first created in 2018 and maintained by the SIG-Addons community. Over the course of 4 years, 200 contributors have built the TFA repository into a community owned and managed success that is being utilized by over 8,000 github repositories according to our dependency graph. We’d like to take a moment to sincerely thank everyone involved as a contributor or community member for their efforts.

Recently, there has been increasing overlap in contributions and scope between TFA and the Keras-CV, and Keras-NLP libraries. To prevent future overlap, we believe that new and existing addons to TensorFlow will be best maintained in Keras project repositories, where possible.

Decision to Wind Down TensorFlow Addons

We believe that it is in the best interest of the TensorFlow community to consolidate where TensorFlow extensions can be utilized, maintained and contributed. Because of this, it is bittersweet that we are announcing our plans to move TensorFlow Addons to a minimal maintenance and release mode.

TFA SIG Addons will be ending development and introduction of new features to this project. TFA will be transitioning to a minimal maintenance and release mode for one year (until May 2024) in order to give appropriate time for you to adjust any dependencies to the overlapping repositories in our TensorFlow community ( Keras, Keras-CV, and Keras-NLP). Going forward, please consider contributing to the Keras-CV and Keras-NLP projects.

Background:

The original RFC proposal for TFA was dated 2018-12-14 with the stated goal of building a community managed repository for contributions that conform to well-established API patterns, but implement new functionality not available in core TensorFlow as defined in our Special Interest Group (SIG) charter.

As the years have progressed, new repositories with healthy contributor communities (Keras-CV, Keras-NLP, etc.) have been created with similar goals to ours and the criteria for contribution acceptance overlaps significantly (e.g. number of required citations). Additionally, since Keras split out of core TensorFlow in 2020, the barrier for community contribution has been substantially lowered.

Understandably, there has been increasing ambiguity regarding where contributions should land and where they will be best maintained. Many features that are available in TFA are simultaneously available in other TensorFlow Community repositories. As just a few examples:

As part of the original RFC, our Special Interest Group agreed to migrate code from tf.contrib and keras.contrib repositories. In doing so, TFA inherited C++ custom-ops, which made TFA a unique place in the TensorFlow community to contribute C++ custom ops to be built and distributed. However, we’ve recently migrated much of that infrastructure to Keras-CV so that they can compile and distribute custom ops as they see fit.

What’s Next: