Esempio n. 1
0
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())
Esempio n. 2
0
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()])
Esempio n. 3
0
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()])
Esempio n. 4
0
def test_gan_with_ae_loss_in_disc_loss():
    with pytest.raises(DazeModelTypeError):
        model = dz.GAN(CifarDecoder(),
                       ConvolutionalEncoder(),
                       100,
                       discriminator_loss=[dz.loss.reconstruction()])
Esempio n. 5
0
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)])
Esempio n. 6
0
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)
Esempio n. 7
0
def test_gan_feature_matching():
    model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), noise_dim=100, generator_loss=[dz.loss.feature_matching()])
    train(model, None)
Esempio n. 8
0
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)
Esempio n. 9
0
def test_gan():
    model = dz.GAN(CifarDecoder(), ConvolutionalEncoder(), 100)
    cbs = [tensorboard_generative_sample(dz.math.random_normal([5, 100]))]
    train(model, cbs)