contrib.layers.one_hot_encoding

tf.contrib.layers.one_hot_encoding

tf.contrib.layers.one_hot_encoding

one_hot_encoding(
    labels,
    num_classes,
    on_value=1.0,
    off_value=0.0,
    outputs_collections=None,
    scope=None
)

Defined in tensorflow/contrib/layers/python/layers/layers.py.

See the guide: Layer