Skip to content

Commit

Permalink
Merge pull request #846 from null-a/warn-when-no-reparam
Browse files Browse the repository at this point in the history
Warn when continuous distribution doesn't support reparam trick.
  • Loading branch information
stuhlmueller committed May 4, 2017
2 parents f5cca9e + e018c14 commit 17d44ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/inference/elbo.ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ module.exports = function(env) {
reparam = false;
}

if (dist.isContinuous && (!dist.base || !dist.transform)) {
var msg = 'Warning: Continuous distribution ' + dist.meta.name + ' does not support reparameterization.';
util.warn(msg, true);
}

return {val: val, reparam: reparam};
},
Expand Down

0 comments on commit 17d44ed

Please sign in to comment.