def test_gan_with_vae_forward_pass(): with pytest.raises(DazeModelTypeError): model = dz.GAN( CifarDecoder(), ConvolutionalEncoder(), 100, forward_pass_func=dz.forward_pass.probabilistic_encode_decode())
def test_gan_with_gen_loss_in_disc_loss(): with pytest.raises(DazeModelTypeError): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), 100, discriminator_loss=[dz.loss.vanilla_generator_loss()])
def test_gan_with_disc_loss_in_gen_loss(): with pytest.raises(DazeModelTypeError): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), 100, generator_loss=[dz.loss.one_sided_label_smoothing()])
def test_gan_with_ae_loss_in_disc_loss(): with pytest.raises(DazeModelTypeError): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), 100, discriminator_loss=[dz.loss.reconstruction()])
def test_gan_with_ae_loss_in_gen_loss(): with pytest.raises(DazeModelTypeError): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), 100, generator_loss=[dz.loss.contractive(.1)])
def test_gan_instance_noise(): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), noise_dim=100, forward_pass_func=dz.forward_pass.generative_adversarial_instance_noise(.2, 0., 1000)) train(model, None)
def test_gan_feature_matching(): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), noise_dim=100, generator_loss=[dz.loss.feature_matching()]) train(model, None)
def test_gan_one_sided_labels(): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), noise_dim=100, discriminator_loss=[dz.loss.one_sided_label_smoothing()]) train(model, None)
def test_gan(): model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), 100) cbs = [tensorboard_generative_sample(dz.math.random_normal([5, 100]))] train(model, cbs)