update training script to compute BLEU of dev set, update computation of dev bleu (on best model score translation), check best model scores after weight update, new

git-svn-id: http://svn.statmt.org/repository/mira@3844 cc96ff50-19ce-11e0-b349-13d7f0bd23df
This commit is contained in:
ehasler 2011-03-22 17:26:01 +00:00 committed by Ondrej Bojar
parent f95a9d5d26
commit 41d2d28408
2 changed files with 4 additions and 1 deletions

View File

@ -121,6 +121,7 @@ int main(int argc, char** argv) {
bool print_feature_values;
bool stop_dev_bleu;
bool stop_approx_dev_bleu;
bool update_after_epoch;
po::options_description desc("Allowed options");
desc.add_options()
("accumulate-most-violated-constraints", po::value<bool>(&accumulateMostViolatedConstraints)->default_value(false), "Accumulate most violated constraint per example")
@ -167,6 +168,7 @@ int main(int argc, char** argv) {
("stop-dev-bleu", po::value<bool>(&stop_dev_bleu)->default_value(false), "Stop when average Bleu (dev) decreases")
("stop-approx-dev-bleu", po::value<bool>(&stop_approx_dev_bleu)->default_value(false), "Stop when average approx. sentence Bleu (dev) decreases")
("stop-weights", po::value<bool>(&weightConvergence)->default_value(false), "Stop when weights converge")
("update-after-epoch", po::value<bool>(&update_after_epoch)->default_value(false), "Accumulate updates and apply them to the weight vector at the end of an epoch")
("use-scaled-reference", po::value<bool>(&useScaledReference)->default_value(true), "Use scaled reference length for comparing target and reference length of phrases")
("verbosity,v", po::value<int>(&verbosity)->default_value(0), "Verbosity level")
("weighted-loss-function", po::value<bool>(&weightedLossFunction)->default_value(false), "Weight the loss of a hypothesis by its Bleu score")

View File

@ -37,7 +37,8 @@ namespace Mira {
const std::vector< float> oracleBleuScores,
const std::vector< size_t> dummy,
float learning_rate,
float max_sentence_update) = 0;
float max_sentence_update,
size_t rank) = 0;
};
class DummyOptimiser : public Optimiser {