def loss(x, x_param): loss = -log_bernoulli(x, p['x']) loss += log_normal(s['z'], q['z']) - log_normal(s['z'], p['z']) return loss
def lossc(y, y_param): loss = -log_bernoulli(y, p['y']) loss += log_normal(s['z'], q['z']) - log_normal(s['z'], p['z|x']) return loss