Pyrox.jl

A convenient DSL for interfacing with Pyro through PyCall.
Author femtomc
Popularity
2 Stars
Updated Last
3 Years Ago
Started In
August 2020
] add Pyrox

A convenient DSL interface to Pyro through PyCall.jl.

using Pyrox

@pyro function model()
    x = rand(:x, Bernoulli(0.6))
    y = rand(:y, Normal(0.3, 1.0))
    y
end

# OR.

@pyro function model()
    x ~ Bernoulli(0.6)
    y ~ Normal(0.3, 1.0)
    y
end

conditioned = condition(model, Dict("y" => 4.0))
sample = conditioned()
println(sample)

Used By Packages

No packages found.