Copyright | (c) Sam Stites 2017 |
---|---|
License | BSD3 |
Maintainer | sam@stites.io |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Random functions for CPU-based tensors.
Documentation
_rand :: Dynamic -> Generator -> IndexStorage -> IO () Source #
C-style, impure, call to Torch's rand
function.
Returns a tensor filled with random numbers from a uniform distribution on the interval [0, 1).
In Lua, this is y = torch.rand(gen, torch.LongStorage{m, n, k, l, o})
, where
the IndexStorage
holds a list of dimensions to be filled.
_randn :: Dynamic -> Generator -> IndexStorage -> IO () Source #
C-style, impure, call to Torch's randn
function.
Returns a tensor filled with random numbers from a normal distribution with mean zero and variance one.
In Lua, this is y = torch.randn(gen, torch.LongStorage{m, n, k, l, o})
, where
the IndexStorage
holds a list of dimensions to be filled.