summaryrefslogtreecommitdiff
path: root/training/mpi_online_optimize.cc
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-28 19:47:13 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-28 19:47:13 +0000
commit08f80cfa824ba728764b5efea358aafee55aafd4 (patch)
tree37c351fdbfe9fc094ba4eab148ce5ba0dde79bb8 /training/mpi_online_optimize.cc
parent5e3ad4eb45808ad842c3912cb9dcbb8d8c90f574 (diff)
fix for prior weights
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@661 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'training/mpi_online_optimize.cc')
-rw-r--r--training/mpi_online_optimize.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/training/mpi_online_optimize.cc b/training/mpi_online_optimize.cc
index 6f5988a4..0c032c01 100644
--- a/training/mpi_online_optimize.cc
+++ b/training/mpi_online_optimize.cc
@@ -277,6 +277,7 @@ int main(int argc, char** argv) {
rng = new MT19937;
}
SparseVector<double> x;
+ weights.InitSparseVector(&x);
int miter = corpus.size(); // hack to cause initial broadcast of order info
TrainingObserver observer;
double objective = 0;
@@ -308,7 +309,7 @@ int main(int argc, char** argv) {
broadcast(world, order, 0);
}
if (rank == 0)
- cerr << "Starting decoding. minibatch=" << size_per_proc << " sentences/proc x " << size << " procs. num_feats=" << x.size() << " training data proc. = " << (iter * batch_size / static_cast<double>(corpus.size())) << " eta=" << lr->eta(iter) << endl;
+ cerr << "iter=" << iter << " minibatch=" << size_per_proc << " sentences/proc x " << size << " procs. num_feats=" << x.size() << " passes_thru_data=" << (iter * batch_size / static_cast<double>(corpus.size())) << " eta=" << lr->eta(iter) << endl;
const int beg = size * miter * size_per_proc + rank * size_per_proc;
const int end = beg + size_per_proc;