# Module: tf.contrib

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/__init__.py) |

Contrib module containing volatile or experimental code.

> [!WARNING]
> **Warning:** The [`tf.contrib`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib) module will not be included in TensorFlow 2.0. Many of its submodules have been integrated into TensorFlow core, or spun-off into other projects like [`tensorflow_io`](https://github.com/tensorflow/io), or [`tensorflow_addons`](https://github.com/tensorflow/addons). For instructions on how to upgrade see the [Migration guide](https://www.tensorflow.org/guide/migrate).

## Modules

[`autograph`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/autograph) module: This is the legacy module for AutoGraph, kept for backward compatibility.

[`batching`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/batching) module: Ops and modules related to batch.

[`bayesflow`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/bayesflow) module: Ops for representing Bayesian computation.

[`checkpoint`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/checkpoint) module: Tools for working with object-based checkpoints.

[`cloud`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/cloud) module: Module for cloud ops.

[`cluster_resolver`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/cluster_resolver) module: Standard imports for Cluster Resolvers.

[`compiler`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/compiler) module: A module for controlling the Tensorflow/XLA JIT compiler.

[`constrained_optimization`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/constrained_optimization) module: A library for performing constrained optimization in TensorFlow.

[`copy_graph`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/copy_graph) module: Functions to copy elements between graphs.

[`crf`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/crf) module: Linear-chain CRF layer.

[`cudnn_rnn`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/cudnn_rnn) module: Ops for fused Cudnn RNN models.

[`data`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/data) module: Experimental API for building input pipelines.

[`deprecated`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/deprecated) module: Non-core alias for the deprecated tf.X_summary ops.

[`distribute`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/distribute) module: A distributed computation library for TF.

[`distributions`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/distributions) module: Classes representing statistical distributions and ops for working with them.

[`eager`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/eager) module: TensorFlow Eager execution prototype.

[`estimator`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/estimator) module: estimator python module.

[`factorization`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/factorization) module: Ops and modules related to factorization.

[`feature_column`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/feature_column) module: Experimental utilities for tf.feature_column.

[`ffmpeg`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/ffmpeg) module: Working with audio using FFmpeg.

[`framework`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/framework) module: Framework utilities.

[`graph_editor`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/graph_editor) module: TensorFlow Graph Editor.

[`grid_rnn`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/grid_rnn) module: GridRNN cells

[`image`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/image) module: Ops for image manipulation.

[`input_pipeline`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/input_pipeline) module: Ops and modules related to input_pipeline.

[`integrate`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/integrate) module: Integration and ODE solvers.

[`keras`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/keras) module: Implementation of the Keras API meant to be a high-level API for TensorFlow.

[`kernel_methods`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/kernel_methods) module: Ops and estimators that enable explicit kernel methods in TensorFlow.

[`labeled_tensor`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/labeled_tensor) module: Labels for TensorFlow.

[`layers`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/layers) module: Ops for building neural network layers, regularizers, summaries, etc.

[`learn`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/learn) module: High level API for learning (DEPRECATED).

[`legacy_seq2seq`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/legacy_seq2seq) module: Deprecated library for creating sequence-to-sequence models in TensorFlow.

[`linear_optimizer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/linear_optimizer) module: Ops for training linear models.

[`lookup`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/lookup) module: Ops for lookup operations.

[`losses`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/losses) module: Ops for building neural network losses.

[`memory_stats`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/memory_stats) module: Ops for memory statistics.

[`metrics`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/metrics) module: Ops for evaluation metrics and summary statistics.

[`mixed_precision`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/mixed_precision) module: Library for mixed precision training.

[`model_pruning`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/model_pruning) module: Model pruning implementation in tensorflow.

[`nn`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/nn) module: Module for variants of ops in tf.nn.

[`opt`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/opt) module: A module containing optimization routines.

[`optimizer_v2`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/optimizer_v2) module: Distribution-aware version of Optimizer.

[`periodic_resample`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/periodic_resample) module: Custom op used by periodic_resample.

[`predictor`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/predictor) module: Modules for `Predictor`s.

[`proto`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/proto) module: Ops and modules related to proto.

[`quantization`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/quantization) module: Ops for building quantized models.

[`quantize`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/quantize) module: Functions for rewriting graphs for quantized training.

[`receptive_field`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/receptive_field) module: Module that declares the functions in tf.contrib.receptive_field's API.

[`recurrent`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/recurrent) module: Recurrent computations library.

[`reduce_slice_ops`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/reduce_slice_ops) module: reduce by slice

[`remote_fused_graph`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/remote_fused_graph) module: Remote fused graph ops python library.

[`resampler`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/resampler) module: Ops and modules related to resampler.

[`rnn`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/rnn) module: RNN Cells and additional RNN operations.

[`rpc`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/rpc) module: Ops and modules related to RPC.

[`saved_model`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/saved_model) module: SavedModel contrib support.

[`seq2seq`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/seq2seq) module: Ops for building neural network seq2seq decoders and losses.

[`signal`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/signal) module: Signal processing operations.

[`slim`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/slim) module: Slim is an interface to contrib functions, examples and models.

[`solvers`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/solvers) module: Ops for representing Bayesian computation.

[`sparsemax`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/sparsemax) module: Module that implements sparsemax and sparsemax loss, see \[1\].

[`specs`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/specs) module: Init file, giving convenient access to all specs ops.

[`staging`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/staging) module: contrib module containing StagingArea.

[`stat_summarizer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/stat_summarizer) module: Exposes the Python wrapper for StatSummarizer utility class.

[`stateless`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/stateless) module: Stateless random ops which take seed as a tensor input.

[`summary`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/summary) module: TensorFlow Summary API v2.

[`tensor_forest`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/tensor_forest) module: Random forest implementation in tensorflow.

[`tensorboard`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/tensorboard) module: tensorboard module containing volatile or experimental code.

[`testing`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/testing) module: Testing utilities.

[`tfprof`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/tfprof) module: tfprof is a tool that profile various aspect of TensorFlow model.

[`timeseries`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/timeseries) module: A time series library in TensorFlow (TFTS).

[`tpu`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/tpu) module: Ops related to Tensor Processing Units.

[`training`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/training) module: Training and input utilities.

[`util`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/contrib/util) module: Utilities for dealing with Tensors.