Skip to content

Commit

Permalink
trigger testing
Browse files Browse the repository at this point in the history
  • Loading branch information
danielturek committed Feb 5, 2024
1 parent 58d7435 commit 2679d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nimbleHMC/R/HMC_samplers.R
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ sampler_NUTS_classic <- nimbleFunction(
p <<- numeric(d) ## keep, sets 'p' to size d on first iteration
drawMomentumValues() ## draws values for p
qpNL <- leapfrog(q, p, epsilon, 1, 2) ## v = 2 is a special case for initializeEpsilon routine
while(any_nan(qpNL$q) | any_nan(qpNL$p)) { ## my addition
while(any_nan(qpNL$q) | any_nan(qpNL$p)) { ## my addition
##if(numWarnings > 0) { print(' [Warning] NUTS_classic sampler (nodes: ', targetNodesToPrint, ') encountered NaN while initializing step-size; recommend better initial values')
## print(' reducing initial step-size'); numWarnings <<- numWarnings - 1 }
epsilon <<- epsilon / 2 ## my addition
Expand Down

0 comments on commit 2679d2f

Please sign in to comment.