summaryrefslogtreecommitdiff
path: root/training/mira
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-02-06 10:26:29 +0100
committerPatrick Simianer <p@simianer.de>2014-02-06 10:26:29 +0100
commit4494c2cae3bed81f9d2d24d749e99bf66a734bc5 (patch)
tree31eb9d39e53cc06ad13b9cd36c76ad1161a47192 /training/mira
parent9c9ba8954358f791a818b3eefda2c0eb805bbd97 (diff)
parent702591b3296af472cc5c7c4720f1c21b2a6e34b1 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'training/mira')
-rw-r--r--training/mira/kbest_cut_mira.cc5
-rwxr-xr-xtraining/mira/mira.py4
2 files changed, 5 insertions, 4 deletions
diff --git a/training/mira/kbest_cut_mira.cc b/training/mira/kbest_cut_mira.cc
index 9de57f5f..62c770df 100644
--- a/training/mira/kbest_cut_mira.cc
+++ b/training/mira/kbest_cut_mira.cc
@@ -937,7 +937,8 @@ int main(int argc, char** argv) {
//reload weights based on update
dense_weights.clear();
lambdas.init_vector(&dense_weights);
- ShowLargestFeatures(dense_weights);
+ if (dense_weights.size() < 500)
+ ShowLargestFeatures(dense_weights);
dense_w_local = dense_weights;
iter++;
@@ -1004,7 +1005,7 @@ int main(int argc, char** argv) {
if (!stream) {
int node_id = rng->next() * 100000;
cerr << " Writing weights to " << node_id << endl;
- Weights::ShowLargestFeatures(dense_weights);
+ //Weights::ShowLargestFeatures(dense_weights);
dots = 0;
ostringstream os;
os << weights_dir << "/weights.mira-pass" << (cur_pass < 10 ? "0" : "") << cur_pass << "." << node_id << ".gz";
diff --git a/training/mira/mira.py b/training/mira/mira.py
index 1861da1a..0980ef2e 100755
--- a/training/mira/mira.py
+++ b/training/mira/mira.py
@@ -119,12 +119,12 @@ def main():
parser.add_argument('--metric-scale', type=int, default=1, metavar='N',
help='scale MT loss by this amount when computing'
' hope/fear candidates')
- parser.add_argument('-k', '--kbest-size', type=int, default=250, metavar='N',
+ parser.add_argument('-k', '--kbest-size', type=int, default=500, metavar='N',
help='size of k-best list to extract from forest')
parser.add_argument('--update-size', type=int, metavar='N',
help='size of k-best list to use for update. defaults to '
'equal kbest-size (applies to optimizer 5)')
- parser.add_argument('--step-size', type=float, default=0.01,
+ parser.add_argument('--step-size', type=float, default=0.001,
help='controls aggresiveness of update')
parser.add_argument('--hope', type=int, default=1, choices=range(1,3),
help='how to select hope candidate. options: '