hasktorch-indef-0.0.1.0: Core Hasktorch abstractions wrapping FFI bindings

Copyright(c) Sam Stites 2017
LicenseBSD3
Maintainersam@stites.io
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Torch.Indef.Dynamic.Tensor.Math.Random.TH

Description

Random functions for CPU-based tensors.

Synopsis

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.

_randperm Source #

Arguments

:: Dynamic

tensor to mutate, inplace

-> Generator

local generator to use

-> Integer
n
-> IO () 

C-style, impure, call to Torch's randperm function.

Returns a random permutation of integers from 1 to n