Source code for distributions.distribution

from abc import abstractmethod
import torch

from disco.scorers.positive_scorer import PositiveScorer


[docs]class Distribution(PositiveScorer): """ Abstract distribution class, a core entity which can be introduced as a PositiveScorer that can produce samples. """
[docs] @abstractmethod def sample(self, context): """Produces samples for the context from the distribution. """ pass