CPU random number generator.
More...
#include <random.h>
|
| Random (int seed) |
| constructor of random engine More...
|
|
| ~Random (void) |
|
void | Seed (int seed) |
| seed random number generator using this seed More...
|
|
unsigned | GetSeed () const |
| get random seed used in random generator More...
|
|
void | set_stream (Stream< cpu > *stream) |
| set the stream of computation More...
|
|
template<int dim> |
expr::ReshapeExp< Tensor< cpu, 1, DType >, DType, 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, DType >, DType, 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 = uniform(s1) * uniform(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...
|
|
std::mt19937 & | GetRndEngine () |
|
template<typename DType>
class mshadow::Random< cpu, DType >
CPU random number generator.
template<typename DType >
constructor of random engine
- Parameters
-
template<typename DType >
template<typename DType >
template<int dim>
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
-
- Returns
- a temporal expression storing standard gaussian random variables
- Template Parameters
-
template<typename DType >
template<typename DType >
get random seed used in random generator
- Returns
- seed in unsigned
template<typename DType >
seed random number generator using this seed
- Parameters
-
template<typename DType >
set the stream of computation
- Parameters
-
template<typename DType >
template<int dim>
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 = uniform(s1) * uniform(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
-
- Returns
- a temporal expression storing standard uniform [0,1)
- Template Parameters
-
The documentation for this class was generated from the following file:
- /work/mxnet/3rdparty/mshadow/mshadow/random.h