Ejemplo n.º 1
0
        public void GpuWithTemporaryBuffers()
        {
            using ReadOnlyBuffer <float> x  = Gpu.Default.AllocateReadOnlyBuffer(X !);
            using ReadOnlyBuffer <float> w  = Gpu.Default.AllocateReadOnlyBuffer(W !);
            using ReadOnlyBuffer <float> b  = Gpu.Default.AllocateReadOnlyBuffer(B !);
            using ReadWriteBuffer <float> y = Gpu.Default.AllocateReadWriteBuffer <float>(Y !.Length);

            BlasHelpers.FullyConnectedForwardGpu(Gpu.Default, C, N, M, P, x, w, b, y);

            y.CopyTo(Y);
        }
Ejemplo n.º 2
0
 public void GpuWithNoTemporaryBuffers()
 {
     BlasHelpers.FullyConnectedForwardGpu(Gpu.Default, C, N, M, P, BufferX !, BufferW !, BufferB !, BufferY !);
 }