Skip to content

Commit

Permalink
make sure pullback is in [0,1]
Browse files Browse the repository at this point in the history
  • Loading branch information
benjione committed Nov 4, 2023
1 parent ff97d69 commit da0a9a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Samplers/PSDModelSampler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function _pullback_first_n(sampler::PSDModelSampler{d, T},
for k=1:n
u[sampler.variable_ordering[k]] = f(k)(x[k])
end
u = map(x->x 0 ? (x one(T) ? x : one(T)) : zero(T) : x, u)
return u
end

Expand Down

0 comments on commit da0a9a5

Please sign in to comment.