Tensorflow: tf.contrib deprecation

Viewed 1567

I've been doing some NLP using tensorflow and have been using tf.contrib.lookup.index_table_from_tensor to create a look-up table for tokens.

I know tensorflow is coming out with 2.0 in Spring '19 and they've said:

"tf.contrib

TensorFlow’s contrib module has grown beyond what can be maintained and supported in a single repository. Larger projects are better maintained separately, while we will incubate smaller extensions along with the main TensorFlow code. Consequently, as part of releasing TensorFlow 2.0, we will stop distributing tf.contrib. We will work with the respective owners on detailed migration plans in the coming months, including how to publicise your TensorFlow extension in our community pages and documentation. For each of the contrib modules we will either a) integrate the project into TensorFlow; b) move it to a separate repository or c) remove it entirely. This does mean that all of tf.contrib will be deprecated, and we will stop adding new tf.contrib projects today. We are looking for owners/maintainers for a number of projects currently in tf.contrib, please contact us (reply to this email) if you are interested."

Two questions then:

1) Is there another way to build a lookup-table easily in Tensorflow?

2) I couldn't determine how likely it is that this functionality will be included in 2.0. Is there any indication?

Thanks!

1 Answers
  1. You should be able to use the lookup functionality under tensorflow 2.0.
  2. The tensorflow.contrib.lookup will move to the core after tensorflow 2.0

According to https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md#list-of-projects.

List of Projects This section lists the possible fate of all projects currently in tf.contrib. The decisions here are preliminary, not all owners have been contacted (those marked with a * have not). Named in parentheses are people with a potential interest in this, but who are not owners.

If you have an interest in one of these projects and are not named as an owner (or as an interested party), please speak up. I've added some (tentative) move targets to as of yet nonexistent repositories: tensorflow/io, tensorflow/contrib (I would prefer a better name for this), and tensorflow/scientific will all require new SIGs to maintain them.

Note that any project that has no other fate specified (including those moving to a repo tentatively maintained by a SIG, but for which no SIG is actually formed) will be deleted by default at 2.0.

Related