def gaussian_log_kl(list_of_mu_inputs, list_of_log_sigma_inputs, name):
    """ log_sigma_inputs should come from linear layer"""
    conc_mu = concatenate(list_of_mu_inputs, name)
    conc_log_sigma = 0.5 * concatenate(list_of_log_sigma_inputs, name)
    kl = 0.5 * tensor.sum(-2 * conc_log_sigma + conc_mu ** 2
                          + tensor.exp(conc_log_sigma) ** 2 - 1, axis=1)
    return kl
dataset/ETHPy150Open kastnerkyle/SciPy2015/graphics_code/cvae/kdl_template.py/gaussian_log_kl/original