Package joshua.discriminative.training.risk_annealer

Examples of joshua.discriminative.training.risk_annealer.DeterministicAnnealer


              featureStringToIntegerMap, featTemplates,
              MRConfig.linearCorpusGainThetas,
              this.haveRefereces
        );
          
          annealer = new DeterministicAnnealer(numPara,  lastWeightVector, MRConfig.isMinimizer, gradientComputer,
              MRConfig.useL2Regula, MRConfig.varianceForL2, MRConfig.useModelDivergenceRegula, MRConfig.lambda, MRConfig.printFirstN);
          if(MRConfig.annealingMode==0)//do not anneal
            lastWeightVector = annealer.runWithoutAnnealing(MRConfig.isScalingFactorTunable, MRConfig.startScaleAtNoAnnealing, MRConfig.temperatureAtNoAnnealing);
          else if(MRConfig.annealingMode==1)
            lastWeightVector = annealer.runQuenching(1.0);
View Full Code Here


         
          //String f_nbest_merged_new = "C:/Users/zli/Documents/minriskannealer.nbest.merged.17";//????????????
          //String f_nbest_merged_new = "C:/Users/zli/Documents/minriskannealer.nbest.merged.1";//????????????
          GradientComputer gradientComputer = new NbestRiskGradientComputer(newNbestMergedFile, referenceFiles, useShortestRef, numTrainingSentence,
              numPara, MRConfig.gainFactor, 1.0, 0.0, true, MRConfig.linearCorpusGainThetas);
          annealer = new DeterministicAnnealer( numPara,  lastWeightVector, MRConfig.isMinimizer, gradientComputer,
              MRConfig.useL2Regula, MRConfig.varianceForL2, MRConfig.useModelDivergenceRegula, MRConfig.lambda, MRConfig.printFirstN);
         
          if(MRConfig.annealingMode==0)//do not anneal
            lastWeightVector = annealer.runWithoutAnnealing(MRConfig.isScalingFactorTunable, MRConfig.startScaleAtNoAnnealing, MRConfig.temperatureAtNoAnnealing);
          else if(MRConfig.annealingMode==1)
View Full Code Here

TOP

Related Classes of joshua.discriminative.training.risk_annealer.DeterministicAnnealer

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.