def loss(x, x_param): loss = -log_bernoulli(x, p['x']) loss += log_normal(s['z'], q['z']) - log_normal(s['z'], p['z']) loss += log_normal(s['a'], q['a']) - log_normal(s['a'], p['a']) return loss
def lossxy(x, x_param): loss = -log_bernoulli(x, p['x']) loss -= log_bernoulli(y, p['y']) loss += log_normal(s['z1'], q['z1']) - log_normal(s['z1'], p['z1']) loss += log_normal(s['z2'], q['z2']) - log_normal(s['z2'], p['z2']) return loss
def loss(y, y_param): loss = -log_bernoulli(y, p['y']) loss += log_normal(s['z1'], q['z1']) - log_normal(s['z1'], p['z1']) loss += log_normal(s['z2'], q['z2']) - log_normal(s['z2'], p['z2']) return loss
def labeled_loss(x, qz, sz, px): loss = -log_bernoulli(x, px) loss += log_normal(sz, qz) - log_normal(sz, (0, 1)) return loss