I am trying to modify some source code in ADVI.
I know I can use
template <bool propto, bool jacobian_adjust_transforms, typename T> T log_prob
to calculate log density. I understand I can let the first option propto=false so as to drop all constants.
But when I compare the result of
log_prob = model_.template log_prob<false, true>
log_prob_2 = model_.template log_prob<true, true>
I find the difference between these two is not a constant. The former one is the same as what I will get if I manually calculate the log density plus jacobian.
For instance, I am playing with the comparison in this line:
Do I misunderstand something on the