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]); }
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; } }
public Link(double w, INeurons n) { Weight = w; In = n; }