Package org.encog.util

Examples of org.encog.util.Stopwatch


  /**
   * {@inheritDoc}
   */
  @Override
  public final void run() {
    final Stopwatch watch = new Stopwatch();
    try {
      watch.start();

      this.currentJob.createTrainer(this.manager.isSingleThreaded());
      final MLTrain train = this.currentJob.getTrain();
      int interation = 1;

      while (this.currentJob.shouldContinue()) {
        train.iteration();
        interation++;
      }
      watch.stop();
    } catch (final Throwable t) {
      this.currentJob.setError(t);
    } finally {
      this.ready.set(true);
      this.manager.jobDone(watch.getElapsedMilliseconds(), this);
    }
  }
View Full Code Here


    MLDataSet trainingSet = new BasicMLDataSet(input, output);

    // train the neural network
    MLTrain train = new Backpropagation(network, trainingSet, 0.7, 0.7);

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

        network, trainingSet, 0.7, 0.7);

    double[] a = new double[2];
    double[] b = new double[1];

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

        network, trainingSet, 0.7, 0.7);

    double[] a = new double[2];
    double[] b = new double[1];

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

        network, trainingSet, 0.7, 0.7);

    double[] a = new double[2];
    double[] b = new double[1];

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void run() {
    final Stopwatch watch = new Stopwatch();
    try {
      watch.start();

      this.currentJob.createTrainer(this.manager.isSingleThreaded());
      final MLTrain train = this.currentJob.getTrain();
      int interation = 1;

      while (this.currentJob.shouldContinue()) {
        train.iteration();
        interation++;
      }
      watch.stop();
    } catch (final Throwable t) {
      this.currentJob.setError(t);
    } finally {
      this.ready.set(true);
      this.manager.jobDone(watch.getElapsedMilliseconds(), this);
    }
  }
View Full Code Here

TOP

Related Classes of org.encog.util.Stopwatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.