ó
    EñiÀ  ã                   ó`   • S SK Jr  S SKJrJr  S SKJr  S SKJr  S SK	J
r
  S/r " S S\5      rg)	é    )ÚTensor)ÚconstraintsÚIndependent)ÚNormal)ÚTransformedDistribution)ÚStickBreakingTransformÚLogisticNormalc            	       óø   ^ • \ rS rSr% Sr\R                  \R                  S.r\R                  r
Sr\\   \S'    SS\\-  S\\-  S	\S-  S
S4U 4S jjjrSU 4S jjr\S
\4S j5       r\S
\4S j5       rSrU =r$ )r	   é   aù  
Creates a logistic-normal distribution parameterized by :attr:`loc` and :attr:`scale`
that define the base `Normal` distribution transformed with the
`StickBreakingTransform` such that::

    X ~ LogisticNormal(loc, scale)
    Y = log(X / (1 - X.cumsum(-1)))[..., :-1] ~ Normal(loc, scale)

Args:
    loc (float or Tensor): mean of the base distribution
    scale (float or Tensor): standard deviation of the base distribution

Example::

    >>> # logistic-normal distributed with mean=(0, 0, 0) and stddev=(1, 1, 1)
    >>> # of the base Normal distribution
    >>> # xdoctest: +IGNORE_WANT("non-deterministic")
    >>> m = LogisticNormal(torch.tensor([0.0] * 3), torch.tensor([1.0] * 3))
    >>> m.sample()
    tensor([ 0.7653,  0.0341,  0.0579,  0.1427])

)ÚlocÚscaleTÚ	base_distNr   r   Úvalidate_argsÚreturnc                 óŽ   >• [        XUS9nUR                  (       d  UR                  S/5      n[        TU ]  U[        5       US9  g )N)r   é   )r   Úbatch_shapeÚexpandÚsuperÚ__init__r   )Úselfr   r   r   r   Ú	__class__s        €Ú`/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/distributions/logistic_normal.pyr   ÚLogisticNormal.__init__,   sI   ø€ ô ˜3°]ÑCˆ	Ø×$×$Ø!×(Ñ(¨!¨Ó-ˆIÜ‰ÑØÔ-Ó/¸}ð 	ò 	
ó    c                 óJ   >• U R                  [        U5      n[        TU ]  XS9$ )N)Ú	_instance)Ú_get_checked_instancer	   r   r   )r   r   r   Únewr   s       €r   r   ÚLogisticNormal.expand9   s&   ø€ Ø×(Ñ(¬¸ÓCˆÜ‰w‰~˜kˆ~Ð9Ð9r   c                 óB   • U R                   R                   R                  $ ©N)r   r   ©r   s    r   r   ÚLogisticNormal.loc=   s   € à�~‰~×'Ñ'×+Ñ+Ð+r   c                 óB   • U R                   R                   R                  $ r"   )r   r   r#   s    r   r   ÚLogisticNormal.scaleA   s   € à�~‰~×'Ñ'×-Ñ-Ð-r   © r"   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚrealÚpositiveÚarg_constraintsÚsimplexÚsupportÚhas_rsampler   r   Ú__annotations__r   ÚfloatÚboolr   r   Úpropertyr   r   Ú__static_attributes__Ú__classcell__)r   s   @r   r	   r	      s·   ø‡ ñð. *×.Ñ.¸×9MÑ9MÑN€Oà×!Ñ!€GØ€Kà˜6Ñ"Ó"ð &*ñ	
à�e‰^ð
ð ˜‰~ð
ð ˜d‘{ð	
ð
 
÷
ð 
÷:ð ð,�Vó ,ó ð,ð ð.�vó .ó ö.r   N)Útorchr   Útorch.distributionsr   r   Útorch.distributions.normalr   Ú,torch.distributions.transformed_distributionr   Útorch.distributions.transformsr   Ú__all__r	   r'   r   r   Ú<module>r?      s-   ðõ ß 8Ý -Ý PÝ Að Ð
€ô6.Ð,õ 6.r   