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.losses.stargan_generator_loss_wrapper

View source on GitHub

Convert a generator loss function to take a StarGANModel.

tf.contrib.gan.losses.stargan_generator_loss_wrapper(loss_fn)

The new function has the same name as the original one.

Args:

  • loss_fn: A python function taking Discriminator's real/fake prediction for generated data.

Returns:

A new function that takes a StarGANModel namedtuple and returns the same loss.