Function marian::inits::uniform¶
Defined in File node_initializers.cpp
Function Documentation¶
-
Ptr<NodeInitializer>
marian::inits
::
uniform
(float a = 0.f, float b = 1.f)¶ Initialize tensor with uniformly distributed random numbers.
By default this generates floating point numbers from the uniform distribution Uniform(0, 1) unless specified differently. If compiled with
CUDA
,marian
will use thecuRand
library for both, GPU and CPU computation. The random sequences generated are the same on both devices. Ifmarian
is compiled withoutCUDA
, a random generator from the C++ standard library is used. These random generators do not have the same random sequences.- Return
- Parameters
a
: the lower bound of intervalb
: the upper bound of interval