Examples of BackPropogationLearningAlgorithm


Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

        //System.out.println("out > " + v_out_0.toString());
       
      }
      br.close();   
     
      BackPropogationLearningAlgorithm bp = ((BackPropogationLearningAlgorithm)mlp.getLearningRule());
     
      System.out.println("Avg RMSE: " + bp.getMetrics().getLastRMSE());
      System.out.println("Total: " + total_recs);
      System.out.println("Correct: " + correct);
   
      double percent = (double)correct / (double)total_recs;
   
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

    // the vector to pull from the local read through cache
    CachedVector cv = new CachedVector( this.nn.getInputsCount(), this.rec_factory.getOutputVectorSize() ) ;// rec_factory.getFeatureVectorSize() );
   
    cachedVecReader.Reset();
   
    BackPropogationLearningAlgorithm bp = ((BackPropogationLearningAlgorithm)this.nn.getLearningRule());
    bp.clearTotalSquaredError();
   
   
     
      try {
        while (cachedVecReader.next(cv)) {
         
          bp.getMetrics().startTrainingRecordTimer();
         
          this.nn.train(cv.vec_output, cv.vec_input);
         
          bp.getMetrics().stopTrainingRecordTimer();
         
        }
      } catch (IOException e) {
        e.printStackTrace();
      }
     
      // TODO: clean up post-epoch -- this may should be handled via the nn interface?
      bp.completeTrainingEpoch();
     
     
      String marker = "";
      if (hitErrThreshold) {
        marker += ", Hit Err Threshold at: " + this.trainingCompleteEpoch;
      }

      if (bp.checkForLearningStallOut() && false == bp.hasHitMinErrorThreshold()) {
        marker += " [ --- STALL ---]";
        this.nn.randomizeWeights();
        if (this.stallBustingOn) {
          bp.resetStallTracking();
          System.out.println("[ --- STALL WORKER RESET --- ]: " + bp.getSetMaxStalledEpochs());
        }
      }
     
      String alr_debug = bp.DebugAdagrad();
     
      this.metrics.printProgressiveStepDebugMsg(this.CurrentIteration, "Epoch: " + this.CurrentIteration + " > RMSE: " + bp.calcRMSError()  + ", Records Trainined: " + this.cachedVecReader.recordsInCache() + marker + ", ALR: " + alr_debug );
      if (this.metricsOn) {
        bp.getMetrics().PrintMetrics();
      }

    NeuralNetworkWeightsDelta nnwd = new NeuralNetworkWeightsDelta();
    nnwd.network = this.nn;
    nnwd.RMSE = bp.calcRMSError();
    this.lastRMSE = nnwd.RMSE;
   
    NetworkWeightsUpdateable nwu = new NetworkWeightsUpdateable();
    nwu.networkUpdate = nnwd;
    nwu.networkUpdate.CurrentIteration = this.CurrentIteration;
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

      // TODO Auto-generated catch block
      e.printStackTrace();
    }
   
    // setup the learning rate
    BackPropogationLearningAlgorithm bp = ((BackPropogationLearningAlgorithm)this.nn.getLearningRule());
    bp.setLearningRate(this.learningRate);
    bp.setStallDetectionParams(this.stallMinErrorDelta, this.stallMaxEpochs);
   
    if (this.adagradLearningRateOn) {
      bp.turnOnAdagradLearning(this.adagradLearningRateInitSetting);
      bp.setup(); // we may need to find a better place for this
      System.out.println("Turning on Adagrad Learning...");
    }
   
//    System.out.println("Debug-Stall > stallMinErrordelta: " + this.stallMinErrorDelta);
//    System.out.println("Debug-Stall > stallMaxEpochs: " + this.stallMaxEpochs);
//    System.out.println("Debug-Stall > bp: " + bp.getSetMaxStalledEpochs());
   
    if (this.metricsOn) {
      bp.turnMetricsOn();
    }
   
   
        if (this.RecordFactoryClassname.equals( "tv.floe.metronome.io.records.MetronomeRecordFactory" )) {
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

   
    //this.nn = global_update.network;
    this.nn.copyWeightsAndConf( global_update.network );
   
    // this is a hack for now TODO: fix this
    BackPropogationLearningAlgorithm bp = ((BackPropogationLearningAlgorithm)this.nn.getLearningRule());
    bp.setStallDetectionParams(this.stallMinErrorDelta, this.stallMaxEpochs);
   
    //System.out.println("max: " + bp.getSetMaxStalledEpochs());
   
   
  }
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

   
     } // for


     this.completeIOWiring();
     this.setLearningRule(new BackPropogationLearningAlgorithm());
     //this.randomizeWeights( new NguyenWidrowRandomizer( -0.7, 0.7 ) );
     this.randomizeWeights();
       
     this.setConfig(conf);
    
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

   
     } // for


     this.completeIOWiring();
     this.setLearningRule(new BackPropogationLearningAlgorithm());
     //this.randomizeWeights( new NguyenWidrowRandomizer( -0.7, 0.7 ) );
       
     this.setConfig(conf);
    
     this.clearNetworkConnectionWeights();
View Full Code Here

Examples of tv.floe.metronome.classification.neuralnetworks.learning.BackPropogationLearningAlgorithm

        avg_rmse += nn_worker.networkUpdate.RMSE;
       
      }
     
      avg_rmse = avg_rmse / workerUpdates.size();
      BackPropogationLearningAlgorithm bp = ((BackPropogationLearningAlgorithm)this.master_nn.getLearningRule());
      bp.getMetrics().setLastRMSE(avg_rmse);
     
      if (avg_rmse <= this.trainingErrorThreshold && !hasHitThreshold && first.networkUpdate.CurrentIteration > 10) {
       
        System.out.println("\nMaster hit avg rmse threshold at epoch: " + first.networkUpdate.CurrentIteration + "\n");
       
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.