Пример #1
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);
     }
 }
Пример #2
0
 public void Uniform(Tensor result, int?seed, float min, float max)
 {
     using (Tensor cpuCopy = new Tensor(cpuAllocator, result.ElementType, result.Sizes))
     {
         cpuRandom.Uniform(cpuCopy, seed, min, max);
         Ops.Copy(result, cpuCopy);
     }
 }