tf.contrib.layers.one_hot_encoding()

tf.contrib.layers.one_hot_encoding(*args, **kwargs)

Transform numeric labels into onehot_labels using tf.one_hot.

Args:
  • labels: [batch_size] target labels.
  • num_classes: total number of classes.
  • on_value: A scalar defining the on-value.
  • off_value: A scalar defining the off-value.
  • outputs_collections: collection to add the outputs.
  • scope: Optional scope for name_scope.
Returns:

one hot encoding of the labels.

doc_TensorFlow
2016-10-14 13:05:22
Comments
Leave a Comment

Please login to continue.