Interface
BFlux.BNNLikelihood
— Typeabstract type BNNLikelihood end
Every likelihood must be a subtype of BNNLikelihood and must implement at least the following fields:
num_params_like
: The number of additional parameters introduced for which inference will be done (i.e. σ for a Gaussian but not ν for a T-Dist if df is not inferred)nc
: A NetConstructor
Every BNNLikelihood must be callable in the following way
(l::BNNLikelihood)(x, y, θnet, θlike)
x
either all data or a minibatchy
either all data or a minibatchθnet
are the network parameterθlike
are the likelihood parameters. If no additional parameters were introduced, this will be an empty array
Every BNNLikelihood must also implement a posterior_predict method which should draw from the posterior predictive given network parameters and likelihood parameters.
posterior_predict(l::BNNLikelihood, x, θnet, θlike)
l
the BNNLikelihoodx
the input dataθnet
network parametersθlike
likelihood parameters