org.apache.clojure-mxnet.random

Random Number interface of mxnet.

normal

(normal loc scale shape-vec {:keys [ctx out], :as opts})(normal loc scale shape-vec)
Generate normal (Gaussian) distribution N(mean, stdvar^^2) with shape.
 `loc`: Mean (centre) of the distribution.
 `scale`: Standard deviation (spread or width) of the distribution.
 `shape-vec`: vector shape of the ndarray generated.
 `opts-map` {
   `ctx`: Context of output ndarray, will use default context if not specified.
   `out`: Output place holder}
 returns: The result ndarray with generated result.
Ex:
  (normal 0 1 [10 10])
  (normal -5 4 [2 3])

seed

(seed seed-state)
Seed the random number generators in mxnet.
This seed will affect behavior of functions in this module,
as well as results from executors that contains Random number
such as Dropout operators.

`seed-state`: The random number seed to set to all devices.
note: The random number generator of mxnet is by default device specific.
      This means if you set the same seed, the random number sequence
      generated from GPU0 can be different from CPU.
Ex:
  (seed-state 42)
  (seed-state 42.0)

uniform

(uniform low high shape-vec {:keys [ctx out], :as opts})(uniform low high shape-vec)
Generate uniform distribution in [`low`, `high`) with shape.
 `low`: The lower bound of distribution.
 `high`: The upper bound of distribution.
 `shape-vec`: vector shape of the ndarray generated.
 `opts-map` {
   `ctx`: Context of output ndarray, will use default context if not specified.
   `out`: Output place holder}
 returns: The result ndarray with generated result.
Ex:
  (uniform 0 1 [1 10])
  (uniform -10 10 [100 100])