Skip to content

Commit

Permalink
fix BactrianUpDownOperator in elementWise mode. fixes #1126
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Sep 12, 2023
1 parent ee65c50 commit c9862c5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public final double proposal() {
for (StateNode up : upInput.get()) {
if (up instanceof RealParameter) {
RealParameter p = (RealParameter) up;
p.setValue(p.getValue(index) * scale);
p.setValue(index, p.getValue(index) * scale);
}
if (outsideBounds(up)) {
return Double.NEGATIVE_INFINITY;
Expand All @@ -102,7 +102,7 @@ public final double proposal() {
for (StateNode down : downInput.get()) {
if (down instanceof RealParameter) {
RealParameter p = (RealParameter) down;
p.setValue(p.getValue(index) / scale);
p.setValue(index, p.getValue(index) / scale);
}
if (outsideBounds(down)) {
return Double.NEGATIVE_INFINITY;
Expand Down

0 comments on commit c9862c5

Please sign in to comment.