You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some shorthands can be provided for samplers to simplify most declaration sampling task. This will make user's code readable and cleaner.
Currently, we have to use the following work flow to define sample tasks (SamplePlan) and proposal distribution is dispatch ed manually to other processors by @everywhere.
space =RealSpace(min=-4, max=4)
sampler =MHSampler(space)
@everywherefunctionnormal(x::T) where T <:Real
factor =1/sqrt(2*pi)
return factor *exp(- x^2/2)
end
plan =SamplePlan(normal, sampler)
data =sample!(plan)
By providing macros @sample could make this easier, and multi-processing's function evaluation should be done inside the macro automatically according to given worker pool. The syntax of this macro is to be decided.
The text was updated successfully, but these errors were encountered:
Some shorthands can be provided for samplers to simplify most declaration sampling task. This will make user's code readable and cleaner.
Currently, we have to use the following work flow to define sample tasks (
SamplePlan
) and proposal distribution is dispatch ed manually to other processors by@everywhere
.By providing macros
@sample
could make this easier, and multi-processing's function evaluation should be done inside the macro automatically according to given worker pool. The syntax of this macro is to be decided.The text was updated successfully, but these errors were encountered: