TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.gan.features.condition_tensor

View source on GitHub

Condition the value of a tensor.

tf.contrib.gan.features.condition_tensor(
    tensor,
    conditioning
)

Conditioning scheme based on https://arxiv.org/abs/1609.03499.

Args:

  • tensor: A minibatch tensor to be conditioned.
  • conditioning: A minibatch Tensor of to condition on. Must be 2D, with first dimension the same as tensor.

Returns:

tensor conditioned on conditioning.

Raises:

  • ValueError: If the non-batch dimensions of tensor aren't fully defined.
  • ValueError: If conditioning isn't at least 2D.
  • ValueError: If the batch dimension for the input Tensors don't match.