/usr/local/lib64/python3.6/site-packages/torch/distributions/__pycache__
Edit: /usr/local/lib64/python3.6/site-packages/torch/distributions/__pycache__/poisson.cpython-36.pyc (2682B)
3
Eg @ sL d dl mZ d dlZd dlmZ d dlmZ d dlmZ G dd deZ dS ) )NumberN)constraints)ExponentialFamily)
broadcast_allc s e Zd ZdZdejiZejZe dd Z
e dd Zd fdd Zd fd
d Z
ej fdd
Zdd Ze dd Zdd Z ZS )Poissona~
Creates a Poisson distribution parameterized by :attr:`rate`, the rate parameter.
Samples are nonnegative integers, with a pmf given by
.. math::
\mathrm{rate}^k \frac{e^{-\mathrm{rate}}}{k!}
Example::
>>> m = Poisson(torch.tensor([4]))
>>> m.sample()
tensor([ 3.])
Args:
rate (Number, Tensor): the rate parameter
ratec C s | j S )N)r )self r G/usr/local/lib64/python3.6/site-packages/torch/distributions/poisson.pymean s zPoisson.meanc C s | j S )N)r )r r r r
variance" s zPoisson.varianceNc sB t |\| _t|tr tj }n
| jj }tt| j ||d d S )N)
validate_args)
r r
isinstancer torchSizesizesuperr __init__)r r r
batch_shape) __class__r r
r &