public static void main(String[] args) {
   NeuralNetwork nn = new NeuralNetwork(2, 4, 1);
   int maxRuns = 50000;
   double minErrorCondition = 0.001;
   //     nn.run(maxRuns, minErrorCondition);
   nn.test();
 }
Beispiel #2
0
    public double getGradientAbs() {
      double currE = 0;

      for (int il = 1; il < neuralNetwork.numberOfLayers(); il++) {
        currE += this.vectorAbs(thresholds.elementAt(il));
        currE += this.doubleVectorAbs(weights.elementAt(il));
      }
      return currE;

      // for (Vector<Double> vector : this.thresholds) currE += this.vectorAbs(vector);
      // for (Vector<Vector<Double>> doubleVector : this.weights) currE +=
      // this.doubleVectorAbs(doubleVector);
      // return currE;
    }