A custom loss function for a VAE learning a standard normal distribution
vae_loss_independent(encoder, kl_weight, rec_dim)
the encoder model of the VAE, used to obtain z_mean and z_log_var from inputs
weight for the KL divergence term
the number of nodes in the input/output of the VAE
returns a function whose parameters match keras loss format