TuringLang / Bijectors.jl

Implementation of normalising flows and constrained random variable transformations
https://turinglang.org/Bijectors.jl/
MIT License
200 stars 33 forks source link

Fitting normalizing flow #213

Closed danielward27 closed 2 years ago

danielward27 commented 2 years ago

Hi,

I planning on fitting a normalizing flow, but Flux.params is not extracting the parameters.

julia> using Bijectors, Flux, Tracker;
julia> d = MvNormal(zeros(2), ones(2));
julia> b = PlanarLayer(2, Tracker.param);
julia> td = transformed(d, b);
julia> Flux.params(td)
Params([])

Is this a bug or have I misunderstood the approach?

Versions:

torfjelde commented 2 years ago

I think you've installed the wrong package https://github.com/scheinerman/Bijections.jl ? :sweat_smile:

danielward27 commented 2 years ago

Oops! I reinstalled the packages in a new environment and it works fine (I think I had the correct package too, but an old version of Flux somehow). Thanks!