Ë
    P/æj¥  ã                   óP   — d dl mZ d dlmZ d dlmZ d dlmZ dgZ G d„ de«      Z	y)é    )Úconstraints)ÚNormal)ÚTransformedDistribution)ÚExpTransformÚ	LogNormalc                   óÔ   ‡ — e Zd ZdZej
                  ej                  dœZej                  ZdZ	dˆ fd„	Z
dˆ fd„	Zed„ «       Zed„ «       Zed„ «       Zed	„ «       Zed
„ «       Zd„ Zˆ xZS )r   a8  
    Creates a log-normal distribution parameterized by
    :attr:`loc` and :attr:`scale` where::

        X ~ Normal(loc, scale)
        Y = exp(X) ~ LogNormal(loc, scale)

    Example::

        >>> # xdoctest: +IGNORE_WANT("non-deterministic")
        >>> m = LogNormal(torch.tensor([0.0]), torch.tensor([1.0]))
        >>> m.sample()  # log-normal distributed with mean=0 and stddev=1
        tensor([ 0.1046])

    Args:
        loc (float or Tensor): mean of log of distribution
        scale (float or Tensor): standard deviation of log of the distribution
    )ÚlocÚscaleTc                 óV   •— t        |||¬«      }t        ‰| �	  |t        «       |¬«       y )N)Úvalidate_args)r   ÚsuperÚ__init__r   )Úselfr	   r
   r   Ú	base_distÚ	__class__s        €úa/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/torch/distributions/log_normal.pyr   zLogNormal.__init__"   s'   ø€ Ü˜3 °]ÔCˆ	Ü‰Ñ˜¤L£NÀ-ÐÕPó    c                 óR   •— | j                  t        |«      }t        ‰| �  ||¬«      S )N)Ú	_instance)Ú_get_checked_instancer   r   Úexpand)r   Úbatch_shaper   Únewr   s       €r   r   zLogNormal.expand&   s(   ø€ Ø×(Ñ(¬°IÓ>ˆÜ‰w‰~˜k°Sˆ~Ó9Ð9r   c                 ó.   — | j                   j                  S ©N)r   r	   ©r   s    r   r	   zLogNormal.loc*   s   € à�~‰~×!Ñ!Ð!r   c                 ó.   — | j                   j                  S r   )r   r
   r   s    r   r
   zLogNormal.scale.   s   € à�~‰~×#Ñ#Ð#r   c                 ót   — | j                   | j                  j                  d«      dz  z   j                  «       S ©Né   )r	   r
   ÚpowÚexpr   s    r   ÚmeanzLogNormal.mean2   s,   € à—‘˜4Ÿ:™:Ÿ>™>¨!Ó,¨qÑ0Ñ0×5Ñ5Ó7Ð7r   c                 ól   — | j                   | j                  j                  «       z
  j                  «       S r   )r	   r
   Úsquarer"   r   s    r   ÚmodezLogNormal.mode6   s'   € à—‘˜4Ÿ:™:×,Ñ,Ó.Ñ.×3Ñ3Ó5Ð5r   c                 óš   — | j                   j                  d«      }|j                  «       d| j                  z  |z   j	                  «       z  S r   )r
   r!   Úexpm1r	   r"   )r   Úscale_sqs     r   ÚvariancezLogNormal.variance:   s<   € à—:‘:—>‘> !Ó$ˆØ�~‰~Ó 1 t§x¡x¡<°(Ñ#:×"?Ñ"?Ó"AÑAÐAr   c                 óP   — | j                   j                  «       | j                  z   S r   )r   Úentropyr	   r   s    r   r,   zLogNormal.entropy?   s   € Ø�~‰~×%Ñ%Ó'¨$¯(©(Ñ2Ð2r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚrealÚpositiveÚarg_constraintsÚsupportÚhas_rsampler   r   Úpropertyr	   r
   r#   r&   r*   r,   Ú__classcell__)r   s   @r   r   r      s¦   ø„ ñð$ *×.Ñ.¸×9MÑ9MÑN€OØ×"Ñ"€GØ€KõQõ:ð ñ"ó ð"ð ñ$ó ð$ð ñ8ó ð8ð ñ6ó ð6ð ñBó ðBö3r   N)
Útorch.distributionsr   Útorch.distributions.normalr   Ú,torch.distributions.transformed_distributionr   Útorch.distributions.transformsr   Ú__all__r   © r   r   ú<module>r>      s'   ðå +Ý -Ý PÝ 7ð ˆ-€ô53Ð'õ 53r   