2 #include <dlprim/context.hpp> 3 #include <dlprim/tensor.hpp> 10 void set_to_zero(Tensor &t,ExecutionContext
const &e);
19 void set_to_urandom(Tensor &t,RandomState &state,
float minv,
float maxv,ExecutionContext
const &e);
24 void set_to_normal(Tensor &t,RandomState &state,
float mean,
float sigma,ExecutionContext
const &e);
28 void set_to_bernoulli(Tensor &t,RandomState &state,
float p,ExecutionContext
const &e);
void set_to_normal(Tensor &t, RandomState &state, float mean, float sigma, ExecutionContext const &e)
set t values to normal distribution with mean and sigma), seed is updated
void set_to_zero(Tensor &t, ExecutionContext const &e)
Set value of t to zero.
void set_to_urandom(Tensor &t, RandomState &state, float minv, float maxv, ExecutionContext const &e)
set t values to uniform random values in range [minv,maxv), seed is updated
void set_to_bernoulli(Tensor &t, RandomState &state, float p, ExecutionContext const &e)
set t values to bernully distribution with mean and sigma), seed is updated
Mane namespace.
Definition: context.hpp:9
void set_to_constant(Tensor &t, double value, ExecutionContext const &e)
Set to constant, value is casted to t.dtype()