From 71794bd18bb3408fb201d6d252aeb3858fda6ca6 Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Tue, 13 Jul 2010 21:31:34 +0000 Subject: Status display git-svn-id: https://ws10smt.googlecode.com/svn/trunk@245 ec762483-ff6d-05da-a07a-a48fb63a330f --- .../prjava/src/phrase/PhraseContextObjective.java | 8 ++++++++ .../prjava/src/phrase/PhraseObjective.java | 1 + 2 files changed, 9 insertions(+) (limited to 'gi/posterior-regularisation/prjava') diff --git a/gi/posterior-regularisation/prjava/src/phrase/PhraseContextObjective.java b/gi/posterior-regularisation/prjava/src/phrase/PhraseContextObjective.java index a9d3529c..7e6c7f60 100644 --- a/gi/posterior-regularisation/prjava/src/phrase/PhraseContextObjective.java +++ b/gi/posterior-regularisation/prjava/src/phrase/PhraseContextObjective.java @@ -76,6 +76,7 @@ public class PhraseContextObjective extends ProjectedObjective if (parameters == null) parameters = new double[n_param]; + System.out.println("Num parameters " + n_param); newPoint = new double[n_param]; gradient = new double[n_param]; initP(); @@ -112,6 +113,8 @@ public class PhraseContextObjective extends ProjectedObjective { updateCalls++; loglikelihood=0; + System.out.print("."); + System.out.flush(); long begin = System.currentTimeMillis(); for (int e=0; e> tasks = new ArrayList>(); + + System.out.print(","); + System.out.flush(); //System.out.println("\t\tprojectPoint: " + Arrays.toString(point)); Arrays.fill(newPoint, 0, newPoint.length, 0); @@ -337,6 +343,8 @@ public class PhraseContextObjective extends ProjectedObjective updateFunction(); boolean success = optimizer.optimize(this,stats,compositeStop); // System.out.println("Ended optimzation Projected Gradient Descent\n" + stats.prettyPrint(1)); + + System.out.println(); if (success) System.out.print("\toptimization took " + optimizer.getCurrentIteration() + " iterations"); diff --git a/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java b/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java index 0e2ab4b9..e62b62f4 100644 --- a/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java +++ b/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java @@ -69,6 +69,7 @@ public class PhraseObjective extends ProjectedObjective c=cluster; data=c.c.getEdgesForPhrase(phrase); n_param=data.size()*c.K; + //System.out.println("Num parameters " + n_param + " for phrase #" + phraseIdx); if (lambda==null){ lambda=new double[c.c.getNumPhrases()][]; -- cgit v1.2.3