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.eval.add_image_comparison_summaries

View source on GitHub

Adds image summaries to compare triplets of images.

Aliases:

  • tf.contrib.gan.eval.summaries.add_image_comparison_summaries
tf.contrib.gan.eval.add_image_comparison_summaries(
    gan_model,
    num_comparisons=2,
    display_diffs=False
)

The first image is the generator input, the second is the generator output, and the third is the real data. This style of comparison is useful for image translation problems, where the generator input is a corrupted image, the generator output is the reconstruction, and the real data is the target.

Args:

  • gan_model: A GANModel tuple.
  • num_comparisons: The number of image triplets to display.
  • display_diffs: Also display the difference between generated and target.

Raises:

  • ValueError: If real data, generated data, and generator inputs aren't images.
  • ValueError: If the generator input, real, and generated data aren't all the same size.