/usr/local/lib64/python3.6/site-packages/torch/distributions/__pycache__
Edit: /usr/local/lib64/python3.6/site-packages/torch/distributions/__pycache__/gamma.cpython-36.pyc (3455B)
3
Eg1 @ sT d dl mZ d dlZd dlmZ d dlmZ d dlmZ dd Z G dd d eZ
dS )
)NumberN)constraints)ExponentialFamily)
broadcast_allc C s
t j| S )N)torch_standard_gamma)
concentration r E/usr/local/lib64/python3.6/site-packages/torch/distributions/gamma.pyr s r c s e Zd ZdZejejdZejZdZdZ e
dd Ze
dd Zd fd
d Z
d fdd
Zej fddZdd Zdd Ze
dd Zdd Z ZS )Gammaa
Creates a Gamma distribution parameterized by shape :attr:`concentration` and :attr:`rate`.
Example::
>>> m = Gamma(torch.tensor([1.0]), torch.tensor([1.0]))
>>> m.sample() # Gamma distributed with concentration=1 and rate=1
tensor([ 0.1046])
Args:
concentration (float or Tensor): shape parameter of the distribution
(often referred to as alpha)
rate (float or Tensor): rate = 1 / scale of the distribution
(often referred to as beta)
)r rateTr c C s | j | j S )N)r r )selfr r r
mean" s z
Gamma.meanc C s | j | jjd S )N )r r pow)r
r r r
variance&