summaryrefslogtreecommitdiff
path: root/gi/posterior-regularisation/prjava/src
diff options
context:
space:
mode:
authortrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 21:31:34 +0000
committertrevor.cohn <trevor.cohn@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-13 21:31:34 +0000
commit71794bd18bb3408fb201d6d252aeb3858fda6ca6 (patch)
tree2cf3889f0a6e2c241081b6e2f76920beee7e6d5f /gi/posterior-regularisation/prjava/src
parent2e885ceeb70c994bcc79cb140f5f7f183c69a950 (diff)
Status display
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@245 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/posterior-regularisation/prjava/src')
-rw-r--r--gi/posterior-regularisation/prjava/src/phrase/PhraseContextObjective.java8
-rw-r--r--gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java1
2 files changed, 9 insertions, 0 deletions
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<data.size(); e++)
@@ -153,6 +156,9 @@ public class PhraseContextObjective extends ProjectedObjective
{
long begin = System.currentTimeMillis();
List<Future<?>> tasks = new ArrayList<Future<?>>();
+
+ 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()][];