View source: R/gen-namespace.R
torch_poisson | R Documentation |
Poisson
torch_poisson(self, generator = NULL)
self |
(Tensor) the input tensor containing the rates of the Poisson distribution |
generator |
( |
Returns a tensor of the same size as input
with each element
sampled from a Poisson distribution with rate parameter given by the corresponding
element in input
i.e.,
\mbox{out}_i \sim \mbox{Poisson}(\mbox{input}_i)
if (torch_is_installed()) {
rates = torch_rand(c(4, 4)) * 5 # rate parameter between 0 and 5
torch_poisson(rates)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.