diff options
author | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-13 18:22:59 +0000 |
---|---|---|
committer | trevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-13 18:22:59 +0000 |
commit | e0265b2c2be3173341bdc2ffacdb6847b30890f5 (patch) | |
tree | f3fbb1d3ed534ca9cab8001f0c19527cd2dd861b /gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods | |
parent | 2eeaa2eb91334bea11d70db1011f1a28ce3bb7d2 (diff) |
Cleaning up the PC model.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@236 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods')
-rw-r--r-- | gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/AbstractGradientBaseMethod.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/AbstractGradientBaseMethod.java b/gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/AbstractGradientBaseMethod.java index 0a4a5445..2fcb7990 100644 --- a/gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/AbstractGradientBaseMethod.java +++ b/gi/posterior-regularisation/prjava/src/optimization/gradientBasedMethods/AbstractGradientBaseMethod.java @@ -56,9 +56,10 @@ public abstract class AbstractGradientBaseMethod implements Optimizer{ stats.collectInitStats(this, o); direction = new double[o.getNumParameters()]; initializeStructures(o, stats, stop); - for (currentProjectionIteration = 1; currentProjectionIteration < maxNumberOfIterations; currentProjectionIteration++){ -// System.out.println("starting iterations: parameters:" ); -// o.printParameters(); + for (currentProjectionIteration = 1; currentProjectionIteration < maxNumberOfIterations; currentProjectionIteration++){ + //System.out.println("\tgradient descent iteration " + currentProjectionIteration); + //System.out.print("\tparameters:" ); + //o.printParameters(); previousValue = currValue; currValue = o.getValue(); gradient = o.getGradient(); @@ -76,7 +77,7 @@ public abstract class AbstractGradientBaseMethod implements Optimizer{ updateStructuresBeforeStep(o, stats, stop); lso.reset(direction); step = lineSearch.getStepSize(lso); -// System.out.println("Leave with step: " + step); + //System.out.println("\t\tLeave with step: " + step); if(step==-1){ System.out.println("Failed to find step"); stats.collectFinalStats(this, o); |