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
functionfoo(x...)
returnsum(x)
end@modelfunctionmodel_test()
z =randomvar(10)
for k in1:10
z[k] ~NormalMeanVariance(0.0, 1.0)
end
x ~foo(z...)
y =datavar(Float64)
y ~NormalMeanVariance(x, 1.0)
end
with error MethodError: no method matching as_variable(::FactorGraphModel, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable).
It likely has to do with the splat operator, possibly in combination with the non-linear node.
This functionality is very useful for dealing with multiple random variables going into a non-linear node. This prevents us from having to write foo(z[1], z[2], ....), which is not automatable when the number is a hyperparameter.
The text was updated successfully, but these errors were encountered:
The following code excerpt fails:
with error
MethodError: no method matching as_variable(::FactorGraphModel, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable, ::RandomVariable)
.It likely has to do with the splat operator, possibly in combination with the non-linear node.
This functionality is very useful for dealing with multiple random variables going into a non-linear node. This prevents us from having to write
foo(z[1], z[2], ....)
, which is not automatable when the number is a hyperparameter.The text was updated successfully, but these errors were encountered: