Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the tf.contrib module in Tensorflow?

Tags:

I'm curious about what tf.contrib is, and why the code would be included in TensorFlow, but not in the main repository.

Furthermore, looking at the example here (from the tensorflow master branch), and I want to find the source for tf.contrib.layers.sparse_column_with_hash_bucket.

It seems like some cool routines, but I wanted to make sure they were properly using queues, etc, for pre-fetching/pre-processing examples to actually use them in a production setting.

It appears to be documented here, but it is from the tflearn project, but tf.contrib.layers.sparse_column_with_hash_bucket doesn't seem to be in that repository either.

like image 518
lollercoaster Avatar asked Jun 27 '16 18:06

lollercoaster


People also ask

What is TF contrib slim?

TF-slim is a new lightweight high-level API of TensorFlow ( tensorflow. contrib. slim ) for defining, training and evaluating complex models. This directory contains code for training and evaluating several widely used Convolutional Neural Network (CNN) image classification models using TF-slim.

What is TF compat v1?

tf. compat allows you to write code that works both in TensorFlow 1.


1 Answers

In general, tf.contrib contains contributed code. It is meant to contain features and contributions that eventually should get merged into core TensorFlow, but whose interfaces may still change, or which require some testing to see whether they can find broader acceptance.

The code in tf.contrib isn't supported by the Tensorflow team. It is included in the hope that it is helpful, but it might change or be removed at any time; there are no guarantees.

The source of tf.contrib.layers.sparse_column_with_hash_bucket can be found at

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/layers/python/layers/feature_column.py#L365

like image 116
Peter Hawkins Avatar answered Oct 25 '22 23:10

Peter Hawkins