Variational autoencoder implemented in tensorflow and pytorch (including inverse autoregressive flow)