summaryrefslogtreecommitdiff
path: root/training/latent_svm
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-11-13 18:12:10 +0100
committerPatrick Simianer <p@simianer.de>2013-11-13 18:12:10 +0100
commitd6e6babf2cfe49fed040b651624b7e34d1a9b507 (patch)
tree2a00ab18f10a7f93e7e172551c01b48cc9f20b8c /training/latent_svm
parent2d2d5eced93d58bc77894d8c328195cd9950b96d (diff)
parent8a24bb77bc2e9fd17a6f6529a2942cde96a6af49 (diff)
merge w/ upstream
Diffstat (limited to 'training/latent_svm')
-rw-r--r--training/latent_svm/latent_svm.cc13
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;