\ :py:mod:`clipppy.guide.sampling_group` ======================================== .. py:module:: clipppy.guide.sampling_group Module Contents --------------- .. py:data:: _Tensor_Type .. py:class:: LocatedAndScaledSamplingGroupWithPrior(sites: Iterable[clipppy.utils.typing._Site], name='', *args, **kwargs) .. py:class:: LocatedSamplingGroup(sites: Iterable[clipppy.utils.typing._Site], name='', *args, **kwargs) .. py:attribute:: loc :annotation: :torch.Tensor .. py:method:: loc(self) .. py:class:: SamplingGroup(sites: Iterable[clipppy.utils.typing._Site], name='', *args, **kwargs) .. py:attribute:: include_det_jac :annotation: = True .. py:method:: _cat_sites(self, vals: Mapping[str, _Tensor_Type]) -> _Tensor_Type .. py:method:: _process_prototype(self) .. py:method:: _sample(self, infer: dict = None) -> torch.Tensor :abstractmethod: .. py:method:: _sample_site(self, group_z: torch.Tensor, name: str, fn: pyro.distributions.TorchDistribution = None) .. py:method:: _scale_diagonal(scale: Union[torch.Tensor, float], jac: torch.Tensor) :staticmethod: .. py:method:: _scale_matrix(scale: Union[torch.Tensor, float], jac: torch.Tensor) :staticmethod: .. py:method:: event_shape(self) -> torch.Size :property: .. py:method:: extra_repr(self) -> str Set the extra representation of the module To print customized extra information, you should re-implement this method in your own modules. Both single-line and multi-line strings are acceptable. .. py:method:: forward(self, infer: dict = None) -> tuple[torch.Tensor, MutableMapping[str, torch.Tensor]] .. py:method:: grad_context(self) :property: .. py:method:: init(self) -> torch.Tensor .. py:method:: jacobian(self, guide_z: torch.Tensor, sites: Iterable[str] = None) -> torch.Tensor .. py:method:: mask(self) -> torch.BoolTensor .. py:method:: unpack(self, group_z: torch.Tensor, sites: Mapping[str, clipppy.utils.typing._Site] = None, guiding=True) -> MutableMapping[str, torch.Tensor] .. py:method:: unpack_site(self, arr: torch.Tensor, name: str) .. py:class:: SamplingGroupWithPrior(sites: Iterable[clipppy.utils.typing._Site], name='', *args, **kwargs) .. py:attribute:: guide_z :annotation: :torch.Tensor .. py:method:: _sample(self, infer=None) -> torch.Tensor .. py:method:: guide_z(self) .. py:method:: prior(self) :abstractmethod: .. py:class:: ScaledSamplingGroup(sites, name='', init_scale: Union[torch.Tensor, float] = 1.0, *args, **kwargs)