torch_blue.vi.KullbackLeiblerModule
- class torch_blue.vi.KullbackLeiblerModule
Bases:
abc.ABCBase class for modules calculating the Kullback-Leibler divergence from distribution parameters.
A KullbackLeiblerModule calculates the analytical Kullback-Leibler divergence between a
Priorand aVariationalDistributionbased on their parameters. They are mainly intended for use with theAnalyticalKullbackLeiblerLoss.Each subclass must define a forward function that is passed, as positional arguments, the parameters of the
Priorin the order specified in itsdistribution_parametersattribute followed by the parameters of theVariationalDistributionin the order specified in itsvariational_parametersattribute.