summaryrefslogtreecommitdiff
path: root/utils/weights.h
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2013-09-17 12:46:02 -0700
committerMichael Denkowski <mdenkows@cs.cmu.edu>2013-09-17 12:46:02 -0700
commit769dfa1e69c22d4aea37840a955db7fd2cf3a4d7 (patch)
tree0f7cad7c0bb484af673e583c9906cfa6a2e09a10 /utils/weights.h
parent895dfd64ea5599ab16981cbfb538ec5f4073c8c1 (diff)
Save/load weights in stream mira
Diffstat (limited to 'utils/weights.h')
-rw-r--r--utils/weights.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/weights.h b/utils/weights.h
index 30f71db0..920fdd75 100644
--- a/utils/weights.h
+++ b/utils/weights.h
@@ -23,6 +23,11 @@ class Weights {
static void SanityCheck(const std::vector<weight_t>& w);
// write weights with largest magnitude to cerr
static void ShowLargestFeatures(const std::vector<weight_t>& w);
+ static std::string GetString(const std::vector<weight_t>& w,
+ bool hide_zero_value_features = true);
+ // Assumes weights are already initialized for now
+ static void UpdateFromString(std::string& w_string,
+ std::vector<weight_t>& w);
private:
Weights();
};