diff options
author | Patrick Simianer <p@simianer.de> | 2013-11-13 18:12:10 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2013-11-13 18:12:10 +0100 |
commit | 062d8af12f2bcad39c47b42295b69f44f878768f (patch) | |
tree | a455fb5dd1a3c01ca3fa6e2ddd5e368040e32eaa /training/latent_svm/latent_svm.cc | |
parent | b8bf706976720527b455eb665fe94f907e372b65 (diff) | |
parent | f83186887c94b2ff8b17aefcd0b395f116c09eb6 (diff) |
merge w/ upstream
Diffstat (limited to 'training/latent_svm/latent_svm.cc')
-rw-r--r-- | training/latent_svm/latent_svm.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/training/latent_svm/latent_svm.cc b/training/latent_svm/latent_svm.cc index ab9c1d5d..60e52550 100644 --- a/training/latent_svm/latent_svm.cc +++ b/training/latent_svm/latent_svm.cc @@ -32,7 +32,6 @@ total_loss and prev_loss actually refer not to loss, but the metric (usually BLE #include "sampler.h" using namespace std; -using boost::shared_ptr; namespace po = boost::program_options; bool invert_score; @@ -128,7 +127,7 @@ struct HypothesisInfo { }; struct GoodOracle { - shared_ptr<HypothesisInfo> good; + boost::shared_ptr<HypothesisInfo> good; }; struct TrainingObserver : public DecoderObserver { @@ -143,9 +142,9 @@ struct TrainingObserver : public DecoderObserver { const DocScorer& ds; const vector<weight_t>& feature_weights; vector<GoodOracle>& oracles; - shared_ptr<HypothesisInfo> cur_best; - shared_ptr<HypothesisInfo> cur_costaug_best; - shared_ptr<HypothesisInfo> cur_ref; + boost::shared_ptr<HypothesisInfo> cur_best; + boost::shared_ptr<HypothesisInfo> cur_costaug_best; + boost::shared_ptr<HypothesisInfo> cur_ref; const int kbest_size; const double mt_metric_scale; const double mu; @@ -168,8 +167,8 @@ struct TrainingObserver : public DecoderObserver { UpdateOracles(smeta.GetSentenceID(), *hg); } - shared_ptr<HypothesisInfo> MakeHypothesisInfo(const SparseVector<double>& feats, const double metric) { - shared_ptr<HypothesisInfo> h(new HypothesisInfo); + boost::shared_ptr<HypothesisInfo> MakeHypothesisInfo(const SparseVector<double>& feats, const double metric) { + boost::shared_ptr<HypothesisInfo> h(new HypothesisInfo); h->features = feats; h->mt_metric_score = metric; return h; |