/// <summary> /// Конструктор. /// </summary> public ConvolutionFirst() { numofneurons = 18816; numofprevneurons = 4096; Neurons = new ConvolutionOfNeuron[numofneurons]; double[,] Weights = WeightInitialize(MemoryMode.GET, "ConvolutionFirst"); Convolutions = new Convolution[6]; for (int i = 0; i < 6; ++i) { double[] temp_weights = new double[25]; for (int j = 0; j < 81; ++j) { temp_weights[j] = Weights[i, j]; } Convolutions[i] = new Convolution(temp_weights); } lastdeltaweights = Weights; for (int i = 0; i < numofneurons; i++) { Neurons[i] = new ConvolutionOfNeuron(null, Convolutions[(int)(i / 3136)]); } }
/// <summary> /// Конструктор нейрона /// </summary> /// <param name="inputs">Массив входных значений</param> /// <param name="convolution">Свертка</param> public ConvolutionOfNeuron(double[] inputs, Convolution convolution) { Conv = convolution; Inputs = inputs; numbInp = new List <int>(); }