-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
As originally noted in #263 (comment), the following lines assume that inputs and outputs of a bijector have the same shape, which is no longer required:
Bijectors.jl/src/bijectors/stacked.jl
Line 77 in fc155c9
@assert size(y) == size(x) "x is size $(size(x)) but y is $(size(y))" Base.size(td::Transformed) = size(td.dist)
To fix this, these methods need an API function that computes the output size of a bijector from the input size, defaulting to the same size.
Alternatively, if Bijectors is meant to support non-array types, such as arbitrary Structs, then these size checks make no sense, and it is perhaps better to generalize this code.
Metadata
Metadata
Assignees
Labels
No labels