CPU random number generator.
More...
#include <tensor_random.h>
|
| Random () |
| constructor of random engine using default seed
|
|
| Random (int seed) |
| constructor of random engine More...
|
|
void | Seed (int seed) |
| seed random number generator using this seed More...
|
|
template<int dim> |
void | SampleBinary (Tensor< cpu, dim > &src) |
|
template<int dim> |
void | SampleBinary (Tensor< cpu, dim > &dst, Tensor< cpu, dim > &src) |
| generate binary data according to a probability matrix More...
|
|
template<int dim> |
void | SampleUniform (Tensor< cpu, dim > &dst, real_t a=0.0f, real_t b=1.0f) |
| generate data from uniform [a,b) More...
|
|
template<int dim> |
void | SampleGaussian (Tensor< cpu, dim > &dst, real_t mu=0.0f, real_t sigma=1.0f) |
| generate data from standard gaussian More...
|
|
template<int dim> |
expr::ReshapeExp< Tensor< cpu, 1 >
, dim, 1 > | gaussian (Shape< dim > shape) |
| return a temporal expression storing standard gaussian random variables the temporal tensor is only valid before next call of gaussian or uniform can be used as part of expression Caution: this means expression such as A = gaussian(s1) * gaussian(s2) will give invalid result, since second call of gaussian(s2) makes gaussian(s1) invalid A = gaussian(s1)*B+C; is correct; use one gaussian/uniform in each expression More...
|
|
template<int dim> |
expr::ReshapeExp< Tensor< cpu, 1 >
, dim, 1 > | uniform (Shape< dim > shape) |
| return a temporal expression storing standard uniform [0,1) the temporal tensor is only valid before next call of gaussian or uniform can be used as part of expression Caution: this means expression such as A = gaussian(s1) * gaussian(s2) will give invalid result, since second call of gaussian(s2) makes gaussian(s1) invalid A = gaussian(s1)*B+C; is correct; use one gaussian/uniform in each expression More...
|
|
template<>
class mshadow::Random< cpu >
CPU random number generator.
constructor of random engine
- Parameters
-
return a temporal expression storing standard gaussian random variables the temporal tensor is only valid before next call of gaussian or uniform can be used as part of expression Caution: this means expression such as A = gaussian(s1) * gaussian(s2) will give invalid result, since second call of gaussian(s2) makes gaussian(s1) invalid A = gaussian(s1)*B+C; is correct; use one gaussian/uniform in each expression
- Parameters
-
- Template Parameters
-
generate binary data according to a probability matrix
- Parameters
-
src | source |
dst | destination |
a | lower bound of uniform |
b | upper bound of uniform |
- Template Parameters
-
generate data from standard gaussian
- Parameters
-
dst | destination |
mu | mean variable |
sigma | standard deviation |
- Template Parameters
-
generate data from uniform [a,b)
- Parameters
-
dst | destination |
a | lower bound of uniform |
b | upper bound of uniform |
- Template Parameters
-
seed random number generator using this seed
- Parameters
-
return a temporal expression storing standard uniform [0,1) the temporal tensor is only valid before next call of gaussian or uniform can be used as part of expression Caution: this means expression such as A = gaussian(s1) * gaussian(s2) will give invalid result, since second call of gaussian(s2) makes gaussian(s1) invalid A = gaussian(s1)*B+C; is correct; use one gaussian/uniform in each expression
- Parameters
-
- Template Parameters
-
The documentation for this class was generated from the following file:
- /home/wangwei/program/asf/release-0.1/apache-singa-incubating-0.1.0-RC1/include/mshadow/tensor_random.h