Beispiel #1
0
 public void Init()
 {
     foreach (Layer2D layer in layers)
     {
         layer.Init();
     }
     Config.outputSize     = new Size((int)layers.Last().GetActivatedBuffer(0).Width, (int)layers.Last().GetActivatedBuffer(0).Height);
     shouldActivationLayer = new InputLayer2D(Config.outputSize, null, layers.Last().GetActivatedBuffer().Length, "ByteToByteFraction");
 }
Beispiel #2
0
        internal MemoryBuffer2D <float>[] GetShouldsActivated(InputLayer2D inputLayer)
        {
            LoadShoulds();
            var buffer = inputLayer.SwapInputs(shouldsOnGPU);

            inputLayer.CalculateOutput();
            for (int i = 0; i < buffer.Length; i++)
            {
                GPUHelper.ScrapOutputBuffer(buffer[i]);
            }
            return(inputLayer.GetActivatedBuffer());
        }