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


View source on GitHub

Convert a gradient penalty function to take a StarGANModel.


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


  • loss_fn: A python function taking real_data, generated_data, generator_inputs for Discriminator's condition (i.e. number of domains), discriminator_fn, and discriminator_scope.


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