Skip to content

Commit

Permalink
Fixed broken call to mapreduce in PositiveDefinite
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaskl97 committed Jan 9, 2025
1 parent 8ac4556 commit a4e044d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/layers/containers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ function (pd::PositiveDefinite)(x::AbstractMatrix, ps, st)
ϕ0, _ = pd.model(st.x0, ps, st.model)
ϕx, new_model_st = pd.model(x, ps, st.model)
return (
mapreduce(
(_x, ϕ) -> pd.ψ- ϕ0) + pd.r(_x, st.x0),
hcat,
zip(eachcol(x), eachcol(ϕx))
),
mapreduce(hcat, zip(eachcol(x), eachcol(ϕx))) do (x, ϕx)
pd.ψ(ϕx - ϕ0) + pd.r(x, st.x0)
end,
merge(st, (; model = new_model_st))
)
end

0 comments on commit a4e044d

Please sign in to comment.