# Variables

## Variable helper functions

TensorFlow provides a set of functions to help manage the set of variables collected in the graph.

## Sharing Variables

TensorFlow provides several classes and operations that you can use to create variables contingent on certain conditions.

## Variable Partitioners for Sharding

The sparse update ops modify a subset of the entries in a dense Variable, either overwriting the entries or adding / subtracting a delta. These are useful for training embedding models and similar lookup-based networks, since only a small subset of embedding vectors change in any given step.
Since a sparse update of a large tensor may be generated automatically during gradient computation (as in the gradient of tf.gather), an tf.IndexedSlices class is provided that encapsulates a set of sparse indices and values. IndexedSlices objects are detected and handled automatically by the optimizers in most cases.