Package org.encog.util.concurrency

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


   
    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

    // 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

Related Classes of org.encog.util.concurrency.DetermineWorkload

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.