Skip to content

Commit

Permalink
add note about dropped term in svae.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjj committed Jun 25, 2018
1 parent 0e9de41 commit d7a553a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions svae/svae.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def gradfun(params, i):
objective = lambda (loglike_params, recogn_params): \
-mc_elbo(pgm_params, loglike_params, recogn_params, i)
val, (loglike_grad, recogn_grad) = vgrad(objective)((loglike_params, recogn_params))
# this expression for pgm_natgrad drops a term that can be computed using
# the function autograd.misc.fixed_points.fixed_point
pgm_natgrad = -natgrad_scale / num_datapoints * \
(flat(pgm_prior) + num_batches*flat(saved.stats) - flat(pgm_params))
grad = unflat(pgm_natgrad), loglike_grad, recogn_grad
Expand Down

0 comments on commit d7a553a

Please sign in to comment.