tf.contrib.gan.features.condition_tensor_from_onehot( tensor, one_hot_labels, embedding_size=256 )
Defined in tensorflow/contrib/gan/python/features/python/conditioning_utils_impl.py
.
Condition a tensor based on a one-hot tensor.
Conditioning scheme based on https://arxiv.org/abs/1609.03499.
tensor
: Tensor to be conditioned.one_hot_labels
: A Tensor of one-hot labels. Shape is [batch_size, num_classes].embedding_size
: The size of the class embedding.tensor
conditioned on one_hot_labels
.
ValueError
: one_hot_labels
isn't 2D, if non-batch dimensions aren't fully defined, or if batch sizes don't match.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/gan/features/condition_tensor_from_onehot