Gen.jl
Gen.jl copied to clipboard
A general-purpose probabilistic programming system with programmable inference
The following works fine: ``` @gen (grad) function kernel(t::Int, (grad)(a::Real)) z ~ normal(a, 1) return z end chain = Gen.Unfold(kernel) T = 3 trace = Gen.simulate(chain, (T, 0.)) choice_gradients(trace, select(T...
Minimal example: ``` @gen function model() x ~ normal(0, 1) {(1, 1)} ~ normal(0, 1) end trace = simulate(model, ()) hmc(trace, selectall()) ``` throws the following error: ``` MethodError: no...
```julia WARNING: replacing module GenInferenceTunerTour. ERROR: LoadError: MethodError: no method matching var"##reverse_kernel#304"(::Gen.DynamicDSLTrace{Gen.DynamicDSLFunction{Any}}, ::Int64, ::Matrix{Float64})┌ Error: Error showing method candidates, aborted │ exception = │ could not determine location of method...
Now that #472 has been merged, we should make sure to update the Gen tutorials to reflect that `@load_generated_functions` is no longer necessary once Gen 0.4.6 is released.
I am using Gen in IJulia Notebook. `using Pkg; Pkg.test("Gen")` Package Gen errored during testing Stacktrace: [1] pkgerror(::String, ::Vararg{String,N} where N) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:120 [2] #test#65(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1357...
It seems like this might prevent usage of algorithms like `hmc` with some of the combinators: ```julia MethodError: no method matching _fill_array!(::Gen.VectorTraceChoiceMap{Gen.UnfoldType, Float64, var"##StaticIRTrace_kernel_nl7b#4224"}, ::Vector{Float64}, ::Int64) Closest candidates are: _fill_array!(::Vector{T},...
work in progress. implements a no u turn sampler but does not implement a dual averaging adaption process for setting epsilon, which can be done as follow up work. code...
As per the `Gen` slack - one thing which may be slightly confusing to people who are initially using `Gen` is that generative functions are structs. This implies that programmers...