def test_pixelvae( image_range=512, no_epoch=10, learning_rate=.0001 ): test_model( pvae.PixelVAE( nb.Binary(), [ 28, 28, 1 ] ), "PixelVAE Bin", train_bin_images[:image_range], test_z, 'bin', no_epoch, learning_rate ) test_model( pvae.PixelVAE( nb.RealGauss(), [ 32, 32, 3 ] ), "PixelVAE RealGauss", deq_train_col_images[:image_range], test_z, 'col', no_epoch, learning_rate ) test_model( pvae.PixelVAE( nb.Discrete(), [ 32, 32, 3 ] ), "PixelVAE Discrete", deq_train_col_images[:image_range], test_z, 'col', no_epoch, learning_rate )
def test_vae( image_range=512, no_epoch=10, learning_rate=.0001 ): test_model( vae.VariationalAutoencoder( nb.Binary(), [ 28, 28, 1 ] ), "VAE Bin", train_bin_images[:image_range], test_z, 'bin', no_epoch, learning_rate ) test_model( vae.VariationalAutoencoder( nb.RealGauss(), [ 32, 32, 3 ] ), "VAE RealGauss", deq_train_col_images[:image_range], test_z, 'col', no_epoch, learning_rate ) test_model( vae.VariationalAutoencoder( nb.Discrete(), [ 32, 32, 3 ] ), "VAE Dscrete", deq_train_col_images[:image_range], test_z, 'col', no_epoch, learning_rate )
def test_cnn( image_range=512, no_epoch=10, learning_rate=.0001 ): test_model( cnn.PixelCNN( nb.Binary(), [ 28, 28, 1] ), "CNN Bin", train_bin_images[:image_range], None, 'bin', no_epoch, learning_rate ) test_model( cnn.PixelCNN( nb.RealGauss(), [ 32, 32, 3 ] ), "CNN RealGauss", deq_train_col_images[:image_range], None, 'col', no_epoch, learning_rate ) test_model( cnn.PixelCNN( nb.Discrete(), [ 32, 32, 3 ] ), "CNN Discrete", deq_train_col_images[:image_range], None, 'col', no_epoch, learning_rate )
def test_nb( image_range=512, no_epoch=10, learning_rate=.0001 ): test_model( nb.NBModel( nb.Binary(), [ 28, 28, 1 ] ), "NB Bin", train_bin_images[:image_range], None, 'bin', no_epoch, learning_rate ) test_model( nb.NBModel( nb.RealGauss(), [ 32, 32, 3 ] ), "NB RealGauss", deq_train_col_images[:image_range], None, 'col', no_epoch, learning_rate ) test_model( nb.NBModel( nb.Discrete(), [ 32, 32, 3 ] ), "NB Discrete", deq_train_col_images[:image_range], None, 'col', no_epoch, learning_rate )