§
    ŠŠtj°  ã                   ód   — d dl mZ 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dS )	é    )ÚTensor)Úconstraints)ÚNormal)ÚTransformedDistribution)ÚExpTransformÚ	LogNormalc            	       ó$  ‡ — e Zd ZU dZej        ej        dœZej        ZdZ	e
ed<   	 ddeez  deez  dedz  d	dfˆ fd
„Zdˆ fd„	Zed	efd„¦   «         Zed	efd„¦   «         Zed	efd„¦   «         Zed	efd„¦   «         Zed	ef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ÚscaleTÚ	base_distNr
   r   Úvalidate_argsÚreturnc                 óŒ   •— t          |||¬¦  «        }t          ¦   «                              |t          ¦   «         |¬¦  «         d S )N)r   )r   ÚsuperÚ__init__r   )Úselfr
   r   r   r   Ú	__class__s        €ú\/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/torch/distributions/log_normal.pyr   zLogNormal.__init__(   sB   ø€ õ ˜3 °]ÐCÑCÔCˆ	Ý‰Œ×Ò˜¥L¡N¤NÀ-ÐÑPÔPÐPÐPÐPó    c                 ó€   •— |                       t          |¦  «        }t          ¦   «                              ||¬¦  «        S )N)Ú	_instance)Ú_get_checked_instancer   r   Úexpand)r   Úbatch_shaper   Únewr   s       €r   r   zLogNormal.expand1   s2   ø€ Ø×(Ò(­°IÑ>Ô>ˆÝ‰wŒw�~Š~˜k°Sˆ~Ñ9Ô9Ð9r   c                 ó   — | j         j        S ©N)r   r
   ©r   s    r   r
   zLogNormal.loc5   s   € àŒ~Ô!Ð!r   c                 ó   — | j         j        S r   )r   r   r   s    r   r   zLogNormal.scale9   s   € àŒ~Ô#Ð#r   c                 óp   — | j         | j                             d¦  «        dz  z                        ¦   «         S ©Né   )r
   r   ÚpowÚexpr   s    r   ÚmeanzLogNormal.mean=   s.   € à”˜4œ:Ÿ>š>¨!Ñ,Ô,¨qÑ0Ñ0×5Ò5Ñ7Ô7Ð7r   c                 óh   — | j         | j                             ¦   «         z
                       ¦   «         S r   )r
   r   Úsquarer$   r   s    r   ÚmodezLogNormal.modeA   s)   € à”˜4œ:×,Ò,Ñ.Ô.Ñ.×3Ò3Ñ5Ô5Ð5r   c                 óž   — | j                              d¦  «        }|                     ¦   «         d| j        z  |z                        ¦   «         z  S r!   )r   r#   Úexpm1r
   r$   )r   Úscale_sqs     r   ÚvariancezLogNormal.varianceE   sA   € à”:—>’> !Ñ$Ô$ˆØ�~Š~ÑÔ 1 t¤x¡<°(Ñ#:×"?Ò"?Ñ"AÔ"AÑAÐAr   c                 óD   — | j                              ¦   «         | j        z   S r   )r   Úentropyr
   r   s    r   r.   zLogNormal.entropyJ   s   € ØŒ~×%Ò%Ñ'Ô'¨$¬(Ñ2Ð2r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚrealÚpositiveÚarg_constraintsÚsupportÚhas_rsampler   Ú__annotations__r   ÚfloatÚboolr   r   Úpropertyr
   r   r%   r(   r,   r.   Ú__classcell__)r   s   @r   r   r      s³  ø€ € € € € € ðð ð& *Ô.¸Ô9MÐNÐN€OàÔ"€GØ€KàÐÐÑð &*ð	Qð Qà�e‰^ðQð ˜‰~ðQð ˜d‘{ð	Qð
 
ðQð Qð Qð Qð Qð Qð:ð :ð :ð :ð :ð :ð ð"�Vð "ð "ð "ñ „Xð"ð ð$�vð $ð $ð $ñ „Xð$ð ð8�fð 8ð 8ð 8ñ „Xð8ð ð6�fð 6ð 6ð 6ñ „Xð6ð ðB˜&ð Bð Bð Bñ „XðBð3ð 3ð 3ð 3ð 3ð 3ð 3r   N)Útorchr   Útorch.distributionsr   Útorch.distributions.normalr   Ú,torch.distributions.transformed_distributionr   Útorch.distributions.transformsr   Ú__all__r   © r   r   ú<module>rD      sŸ   ðð Ð Ð Ð Ð Ð Ø +Ð +Ð +Ð +Ð +Ð +Ø -Ð -Ð -Ð -Ð -Ð -Ø PÐ PÐ PÐ PÐ PÐ PØ 7Ð 7Ð 7Ð 7Ð 7Ð 7ð ˆ-€ð>3ð >3ð >3ð >3ð >3Ð'ñ >3ô >3ð >3ð >3ð >3r   