带有l1_pixel_loss的GANEstimator(pix2pix)

时间:2017-11-07 20:29:03

标签: tensorflow

最近发布的TFGAN module README包含有关如何合并l1_pixel_loss

的信息
# Modify the loss tuple to include the pixel loss.
gan_loss = tfgan.losses.combine_adversarial_loss(
    gan_loss, gan_model, l1_pixel_loss, weight_factor=FLAGS.weight_factor)

该模块还包含一个GANEstimator类,但没有很多示例,具体说明没有关于如何组合l1_pixel_loss的示例。

# Create GAN estimator.
gan_estimator = estimator.GANEstimator(
    model_dir,
    generator_fn=generator_fn,
    discriminator_fn=discriminator_fn,
    generator_loss_fn=tfgan.losses.wasserstein_generator_loss,
    discriminator_loss_fn=tfgan.losses.wasserstein_discriminator_loss,
    generator_optimizer=tf.train.AdamOptimizier(0.1, 0.5),
    discriminator_optimizer=tf.train.AdamOptimizier(0.1, 0.5))

如何正确地将l1_pixel_loss添加到GANEstimator?

0 个答案:

没有答案