Examples of DetermineWorkload


Examples of org.encog.engine.concurrency.DetermineWorkload

  /**
   * Init the process.
   */
  private void init() {

    final DetermineWorkload determine = new DetermineWorkload(
        this.numThreads, (int) this.indexable.getRecordCount());

    this.workers = new FlatGradientWorker[determine.getThreadCount()];

    int index = 0;

    // handle CPU
    for (final IntRange r : determine.calculateWorkers()) {
      this.workers[index++] = new GradientWorkerCPU(this.network.clone(),
          this, this.indexable.openAdditional(), r.getLow(),
          r.getHigh());
    }
  }
View Full Code Here

Examples of org.encog.util.concurrency.DetermineWorkload

      EngineArray.fill(this.flatSpot, 0.0);
    }
   
   
    // setup workers
    final DetermineWorkload determine = new DetermineWorkload(
        this.numThreads, (int) this.indexable.getRecordCount());

    this.workers = new GradientWorker[determine.getThreadCount()];

    int index = 0;

    // handle CPU
    for (final IntRange r : determine.calculateWorkers()) {
      this.workers[index++] = new GradientWorker(this.network.clone(),
          this, this.indexable.openAdditional(), r.getLow(),
          r.getHigh(), this.flatSpot, this.ef);
    }
   
View Full Code Here

Examples of org.encog.util.concurrency.DetermineWorkload

   
    this.hessianMatrix = new Matrix(weightCount,weightCount);
    this.hessian = this.hessianMatrix.getData();
   
    // create worker(s)
    final DetermineWorkload determine = new DetermineWorkload(
        this.numThreads, (int) this.training.getRecordCount());

    this.workers = new ChainRuleWorker[determine.getThreadCount()];

    int index = 0;

    // handle CPU
    for (final IntRange r : determine.calculateWorkers()) {
      this.workers[index++] = new ChainRuleWorker(this.flat.clone(),
          this.training.openAdditional(), r.getLow(),
          r.getHigh());
    }
   
View Full Code Here

Examples of org.encog.util.concurrency.DetermineWorkload

    // online training.
    if (this.batchSize != 0) {
      this.numThreads = 1;
    }

    final DetermineWorkload determine = new DetermineWorkload(
        this.numThreads, (int) this.indexable.getRecordCount());

    int actualThreadCount = determine.getThreadCount();

    this.workers = new GradientWorker[actualThreadCount];

    int index = 0;

    for (final IntRange r : determine.calculateWorkers()) {
      this.workers[index++] = new GradientWorker(
          this.currentFlatNetwork.clone(), this,
          this.indexable.openAdditional(), r.getLow(), r.getHigh(),
          this.flatSpot, this.ef);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.