Пример #1
0
 public FFNNetLayer(int neurons, int weightsPerNeurons, IBufferAllocator allocator, Type precission)
 {
     this.neurons           = neurons;
     this.weightsPerNeurons = weightsPerNeurons;
     this.elementSize       = Marshal.SizeOf(precission);
     weights = allocator.AllocateBuffer(neurons * WeightsPerNeurons * elementSize);
     outputs = allocator.AllocateBuffer(neurons * elementSize);
     biases  = allocator.AllocateBuffer(neurons * elementSize);
     lambdas = allocator.AllocateBuffer(neurons * elementSize);
 }