Ejemplo n.º 1
0
 public void Normal(NDArray result, int?seed, float mean, float stdv)
 {
     using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Normal(cpuCopy, seed, mean, stdv);
         TOps.Copy(result, cpuCopy);
     }
 }
Ejemplo n.º 2
0
 public void Exponential(NDArray result, int?seed, float lambda)
 {
     using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Exponential(cpuCopy, seed, lambda);
         TOps.Copy(result, cpuCopy);
     }
 }
Ejemplo n.º 3
0
 public void Uniform(NDArray result, int?seed, float min, float max)
 {
     using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Uniform(cpuCopy, seed, min, max);
         TOps.Copy(result, cpuCopy);
     }
 }
Ejemplo n.º 4
0
 public void Bernoulli(NDArray result, int?seed, float p)
 {
     using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Bernoulli(cpuCopy, seed, p);
         TOps.Copy(result, cpuCopy);
     }
 }
Ejemplo n.º 5
0
 public void Cauchy(NDArray result, int?seed, float median, float sigma)
 {
     using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Cauchy(cpuCopy, seed, median, sigma);
         TOps.Copy(result, cpuCopy);
     }
 }
Ejemplo n.º 6
0
 public void Geometric(Tensor result, int?seed, float p)
 {
     using (var cpuCopy = new Tensor(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Geometric(cpuCopy, seed, p);
         TOps.Copy(result, cpuCopy);
     }
 }
Ejemplo n.º 7
0
 public void LogNormal(Tensor result, int?seed, float mean, float stdv)
 {
     using (var cpuCopy = new Tensor(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.LogNormal(cpuCopy, seed, mean, stdv);
         TOps.Copy(result, cpuCopy);
     }
 }