sbi
sbi copied to clipboard
Estimator abstractions
We currently only have the DensityEstimator abstraction, but we might want to expand this for other approaches. I would suggest something like this:
class Estimator(nn.Module):
def loss(...)
class DensityEstimator(Estimator)
def sample(...)
def log_prob(...)
def sample_and_log_prob(...)
class RatioEstimator(Estimator)
def log_ratio(...) ( Not sure, depends on what we need, here)
class ScoreEstimator(Estimator)
def score(...)
The different Posterior Classes will implement the sample and log_prob methods anyway and must be adapted to support different estimators internally (if possible).