Пример #1
0
 public void Geometric(NDArray result, int?seed, float p)
 {
     using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape))
     {
         cpuRandom.Geometric(cpuCopy, seed, p);
         TOps.Copy(result, cpuCopy);
     }
 }
Пример #2
0
 public void Geometric(Tensor result, int?seed, float p)
 {
     using (Tensor cpuCopy = new Tensor(cpuAllocator, result.ElementType, result.Sizes))
     {
         cpuRandom.Geometric(cpuCopy, seed, p);
         Ops.Copy(result, cpuCopy);
     }
 }