It's quite a pain to configure standard torch.distributions in yaml files, as they often require matrix-like arguments. For example torch.distributions.Normal takes vector-like loc and scale arguments, but then its log_pdf function returns a scalar as well.
We need to make a custom ili.utils.distributions module which wraps the distributions in torch.distributions and pydelfi.priors to make them more amenable for yaml-like configuration. Then, we can point to these objects as our prior functionality, and also provide guidance for people to make custom ones down the line.
It's quite a pain to configure standard
torch.distributions
in yaml files, as they often require matrix-like arguments. For exampletorch.distributions.Normal
takes vector-likeloc
andscale
arguments, but then itslog_pdf
function returns a scalar as well.We need to make a custom
ili.utils.distributions
module which wraps the distributions intorch.distributions
andpydelfi.priors
to make them more amenable for yaml-like configuration. Then, we can point to these objects as our prior functionality, and also provide guidance for people to make custom ones down the line.