Skip to content

Commit

Permalink
Merge pull request probmods#387 from null-a/minor-hmc-tweaks
Browse files Browse the repository at this point in the history
Minor HMC tweaks
  • Loading branch information
stuhlmueller committed Mar 31, 2016
2 parents adf4317 + ca0264c commit fe38601
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/inference/hmckernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ module.exports = function(env) {
// variables.
this.prevTrace = trace;
this.trace = this.prevTrace.fresh();
// Once the WebPPL program has finished we need to call k to
// Once the WebPPL program has finished we need to call cont to
// continue inference. Since the program will call env.exit once
// finished, we save k here in order to resume inference as
// finished, we save cont here in order to resume inference as
// desired. Note that we can't pass a continuation other than
// env.exit to the program. This is because the continuation is
// store as part of the trace, and when invoked by a different
// stored as part of the trace, and when invoked by a different
// MCMC kernel execution would jump back here.
this.positionStepCont = cont;
return this.trace.continue();
Expand All @@ -170,7 +170,7 @@ module.exports = function(env) {
assert(!this.trace.isComplete());
}
var cont = this.positionStepCont;
this.thisPositionStepCont = undefined;
this.positionStepCont = undefined;
return cont(this.trace);
};

Expand Down

0 comments on commit fe38601

Please sign in to comment.