コード例 #1
0
        public INeurons Pulling(List <List <INeurons> > neuronsOut, INeurons neuronIn)
        {
            int iMax = 0, jMax = 0;

            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < width; j++)
                {
                    if (neuronsOut[iMax][jMax].Result < neuronsOut[i][j].Result)
                    {
                        iMax = i;
                        jMax = j;
                    }
                }
            }

            neuronIn.Result = neuronsOut[iMax][jMax].Result;

            return(neuronsOut[iMax][jMax]);
        }
コード例 #2
0
        public void Convolution(List <List <double> > neuronsOut, INeurons neuronIn)
        {
            double sum = 0;

            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < width; j++)
                {
                    sum += neuronsOut[i][j] * weigth[i][j];
                }
            }

            neuronIn.Sum = sum;
            if (sum > 0)
            {
                neuronIn.Result = sum;
            }
            else
            {
                neuronIn.Result = 0.01 * sum;
            }
        }
コード例 #3
0
 public Link(double w, INeurons n)
 {
     Weight = w;
     In     = n;
 }