ISubGVQA.sampling.methods.target ================================ .. py:module:: ISubGVQA.sampling.methods.target Attributes ---------- .. autoapisummary:: ISubGVQA.sampling.methods.target.logger Classes ------- .. autoapisummary:: ISubGVQA.sampling.methods.target.BaseTargetDistribution ISubGVQA.sampling.methods.target.TargetDistribution Module Contents --------------- .. py:data:: logger .. py:class:: BaseTargetDistribution Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: params(theta: torch.Tensor, dy: torch.Tensor) -> torch.Tensor :abstractmethod: .. py:class:: TargetDistribution(alpha: float = 1.0, beta: float = 1.0) Bases: :py:obj:`BaseTargetDistribution` Creates a generator of target distributions parameterized by :attr:`alpha` and :attr:`beta`. Example:: >>> import torch >>> target_distribution = TargetDistribution(alpha=1.0, beta=1.0) >>> target_distribution.params(theta=torch.tensor([1.0]), dy=torch.tensor([1.0])) tensor([2.]) Args: alpha (float): weight of the initial distribution parameters theta beta (float): weight of the downstream gradient dy .. py:attribute:: alpha :value: 1.0 .. py:attribute:: beta :value: 1.0 .. py:method:: params(theta: torch.Tensor, dy: torch.Tensor) -> torch.Tensor