Ejemplo n.º 1
0
        /// <summary>
        /// Получение и обновление дельты свёрточного слоя.
        /// </summary>
        /// <param name="hiddenLayer">Скрытый слой.</param>
        /// <param name="convolutionalLayer">Свёрточный слой.</param>
        private void ConvolutionalToHiddenDeltasWork(HiddenLayer hiddenLayer, ConvolutionalLayer convolutionalLayer)
        {
            var convolutionalLayerNeurons = convolutionalLayer.GetLayerNeurons();
            var convolutionalLayerOutputs = new List <double>();

            convolutionalLayerNeurons.ForEach(neuron =>
                                              convolutionalLayerOutputs.Add(neuron.Output));

            var convolutionalLayerDeltas = GetConvolutionalLayerDeltas(convolutionalLayerOutputs,
                                                                       hiddenLayer.GetLayerNeurons());

            convolutionalLayer.UpdateDeltas(convolutionalLayerDeltas);
        }