This code shows how to implement VAE in Julia Flux based on the paper https://arxiv.org/abs/1312.6114.
This implemtation also references https://github.com/bojone/vae/blob/master/vae_keras.py and https://github.com/FluxML/model-zoo/blob/master/vision/vae_mnist.
This code has been tested in Julia 1.4.