google-deepmind / torch-distributions

Probability distributions, wrapped for Torch.
BSD 3-Clause "New" or "Revised" License
61 stars 25 forks source link

Fixed KL bug and changed KL calling convention #34

Closed dpfau closed 9 years ago

dpfau commented 9 years ago

Fixed issue #33 (missing divide by 2 in one term) and changed calling convention for all KL divergences so that: 1) The arguments are always a pair of tables containing named parameters (this only affectes dir.kl, which previously took two vectors as arguments) 2) The first argument is named q and the second is named p, to be consistent with the conventional notation.

jucor commented 9 years ago

Thanks for your vigilance David!

dpfau commented 9 years ago

My pleasure. A happy side effect of tracking down all these maddening bugs in my code...