Giter Site home page Giter Site logo

Comments (8)

torfjelde avatar torfjelde commented on July 20, 2024 1

Ah crap, didn't think of that. It's because Flux.params filters out non-arrays.

A simple solution is to just to keep track of the parameters outside of the model, i.e. not using Flux.params.
Alternatively, you can wait for #123 👍

from bijectors.jl.

torfjelde avatar torfjelde commented on July 20, 2024

Ah, thanks for pointing this out! This was introduced not too long ago in a PR and the change sort of slipped under the radar.

For the moment, I'd manually instantiate PlanarLayer. Under the hood it's literally just doing PlanarLayer(randn(2), randn(2), randn()) and it was supposed to wrap the arguments in param.

from bijectors.jl.

torfjelde avatar torfjelde commented on July 20, 2024

Fix is one the way!

from bijectors.jl.

cmerkatas avatar cmerkatas commented on July 20, 2024

Thank you @torfjelde. It will be useful to fit flows I believe. I haven't managed to "track" it even manually but it was a quick test. I will try again later.

from bijectors.jl.

torfjelde avatar torfjelde commented on July 20, 2024

Should be fixed now, i.e. you can do PlanarLayer(2, Tracker.param) 👍

from bijectors.jl.

torfjelde avatar torfjelde commented on July 20, 2024

Fixed in #122

from bijectors.jl.

cmerkatas avatar cmerkatas commented on July 20, 2024

Thank you, that fix really does Track the components. However, there is still some problem with the examples. For example


using Bijectors
using Flux, Tracker

d = MvNormal(zeros(2), ones(2));
b = PlanarLayer(2, Tracker.param);
flow = transformed(d,b)
# after this point b is not tracked anymore 

@Flux.treelike Composed
@Flux.treelike Bijectors.TransformedDistribution
@Flux.treelike PlanarLayer
ps = Flux.params(flow)

Params([[-0.5236266422759951, -0.05265731672851134] (tracked), [1.1964638246267423, -0.5138318038308557] (tracked)])

Am I missing something?

from bijectors.jl.

cmerkatas avatar cmerkatas commented on July 20, 2024

Ah got it. Thanks for your reply!

from bijectors.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.