Skip to content

Commit

Permalink
Fix for bug in forward of Stacked (#192)
Browse files Browse the repository at this point in the history
* fixed a bug with the default forward for stacked

* bump patch version

* Update Project.toml

Co-authored-by: Hong Ge <[email protected]>
  • Loading branch information
torfjelde and yebai authored Aug 24, 2022
1 parent 95020ff commit 6f05a87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Bijectors"
uuid = "76274a88-744f-5084-9051-94815aaf08c4"
version = "0.10.5"
version = "0.10.6"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down Expand Up @@ -35,4 +35,4 @@ MappedArrays = "0.2.2, 0.3, 0.4"
Reexport = "0.2, 1"
Requires = "0.5, 1"
Roots = "1.3.4, 2"
julia = "1.3"
julia = "1.6"
4 changes: 2 additions & 2 deletions src/bijectors/stacked.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ function with_logabsdet_jacobian(sb::Stacked, x::AbstractVector)
N = length(sb.bs)
yinit, linit = with_logabsdet_jacobian(sb.bs[1], x[sb.ranges[1]])
logjac = sum(linit)
ys = mapvcat(drop(sb.bs, 1), drop(sb.ranges, 1)) do b, r
ys = mapreduce(vcat, sb.bs[2:end], sb.ranges[2:end]; init=yinit) do b, r
y, l = with_logabsdet_jacobian(b, x[r])
logjac += sum(l)
y
end
return (vcat(yinit, ys), logjac)
return (ys, logjac)
end

2 comments on commit 6f05a87

@yebai
Copy link
Member

@yebai yebai commented on 6f05a87 Aug 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/67281

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.6 -m "<description of version>" 6f05a87647a05ab71c1602dffbb6d28d89dcd57e
git push origin v0.10.6

Please sign in to comment.