image_output_1.png
from csnl import DenseLadderVAE, DataGenerator, ModelTrainer, VAEPlotter

import matplotlib.pyplot as plt

datagen = DataGenerator(image_shape=(28, 28, 1), batch_size=100, file_path='../input/textures_42000_28px.pkl')

LATENT_DIM1 = 16 * 8
LATENT_DIM2 = 16
vae = DenseLadderVAE(input_shape=(100, 28 * 28), latent_dim1=LATENT_DIM1, latent_dim2=LATENT_DIM2)

trainer = ModelTrainer(vae, datagen, loss_fn='normal', lr=5e-05, decay=0.0001, beta=1)

trainer.fit(100, 2000, warm_up=True)

import matplotlib.pyplot as plt

plotter = VAEPlotter(trainer, datagen)

plotter.grid_plot()