Package org.encog.neural.networks.training.propagation

Examples of org.encog.neural.networks.training.propagation.TrainingContinuation


    rprop1.iteration();
   
    rprop2.iteration();
    rprop2.iteration();
   
    TrainingContinuation cont = rprop2.pause();
   
    ResilientPropagation rprop3 = new ResilientPropagation(net2,trainingSet);
    rprop3.resume(cont);
   
    rprop1.iteration();
View Full Code Here


    rprop1.iteration();
   
    rprop2.iteration();
    rprop2.iteration();
   
    TrainingContinuation cont = rprop2.pause();
   
    EncogDirectoryPersistence.saveObject(EG_FILENAME, cont);
    TrainingContinuation cont2 = (TrainingContinuation)EncogDirectoryPersistence.loadObject(EG_FILENAME);
   
    ResilientPropagation rprop3 = new ResilientPropagation(net2,trainingSet);
    rprop3.resume(cont2);
   
    rprop1.iteration();
View Full Code Here

          this.getParentTab().setEncogObject(this.getEncogObject());
        }
      }
     
      if( this.train.canContinue() ) {
        TrainingContinuation cont = train.pause()
        String name = FileUtil.getFileName(this.getEncogObject().getFile());
        name = FileUtil.forceExtension(name + "-cont", "eg");
        File path = new File(name);
        EncogWorkBench.getInstance().save(path, cont);
        EncogWorkBench.getInstance().refresh();
View Full Code Here

        String name = FileUtil.getFileName( getEncogObject().getFile() );
        name+="-cont.eg";
        File path = new File(name);
        if( path.exists() ) {
          try {
            TrainingContinuation cont = (TrainingContinuation)EncogDirectoryPersistence.loadObject(path);
            train.resume(cont);
          } catch(Exception ex) {
            EncogWorkBench.displayError("Trainning Resume Incompatible", "Cannot use previous training data, training will begin as best it can.");
            path.delete();
          }
View Full Code Here

    ResilientPropagation train = new ResilientPropagation(network, trainingSet);
    train.addStrategy(new RequiredImprovementStrategy(5));
   
    System.out.println("Perform initial train.");
    EncogUtility.trainToError(train,0.01);
    TrainingContinuation cont = train.pause();
    System.out.println(Arrays.toString((double[])cont.getContents().get(ResilientPropagation.LAST_GRADIENTS)));
    System.out.println(Arrays.toString((double[])cont.getContents().get(ResilientPropagation.UPDATE_VALUES)));
   
    try
    {
    cont = (TrainingContinuation)SerializeObject.load(new File("resume.ser"));
    }
View Full Code Here

   *
   * @return A training continuation object to continue with.
   */
  @Override
  public final TrainingContinuation pause() {
    final TrainingContinuation result = new TrainingContinuation();
    result.setTrainingType(this.getClass().getSimpleName());
    final TrainFlatNetworkQPROP qprop = (TrainFlatNetworkQPROP) getFlatTraining();
    final double[] d = qprop.getLastGradient();
    result.set(QuickPropagation.LAST_GRADIENTS, d);
    return result;
  }
View Full Code Here

   *
   * @return A training continuation object to continue with.
   */
  @Override
  public final TrainingContinuation pause() {
    final TrainingContinuation result = new TrainingContinuation();
    result.setTrainingType(this.getClass().getSimpleName());
    final TrainFlatNetworkBackPropagation backFlat = (TrainFlatNetworkBackPropagation) getFlatTraining();
    final double[] d = backFlat.getLastDelta();
    result.set(Backpropagation.LAST_DELTA, d);
    return result;
  }
View Full Code Here

   *
   * @return A training continuation object to continue with.
   */
  @Override
  public final TrainingContinuation pause() {
    final TrainingContinuation result = new TrainingContinuation();

    result.setTrainingType(this.getClass().getSimpleName());

    result.set(ResilientPropagation.LAST_GRADIENTS,
        ((TrainFlatNetworkResilient) getFlatTraining())
            .getLastGradient());
    result.set(ResilientPropagation.UPDATE_VALUES,
        ((TrainFlatNetworkResilient) getFlatTraining())
            .getUpdateValues());

    return result;
  }
View Full Code Here

   
    // train network 2, continue
    ResilientPropagation rprop2 = new ResilientPropagation(network2,trainingData);
    rprop2.iteration();
    rprop2.iteration();
    TrainingContinuation state = rprop2.pause();
    rprop2 = new ResilientPropagation(network2,trainingData);
    rprop2.resume(state);
    rprop2.iteration();
    rprop2.iteration();
   
View Full Code Here

   
    // train network 2, continue
    Backpropagation rprop2 = new Backpropagation(network2,trainingData,0.4,0.4);
    rprop2.iteration();
    rprop2.iteration();
    TrainingContinuation state = rprop2.pause();
    rprop2 = new Backpropagation(network2,trainingData,0.4,0.4);
    rprop2.resume(state);
    rprop2.iteration();
    rprop2.iteration();
   
View Full Code Here

TOP

Related Classes of org.encog.neural.networks.training.propagation.TrainingContinuation

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.