diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-09-17 12:46:02 -0700 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-09-17 12:46:02 -0700 |
commit | 769dfa1e69c22d4aea37840a955db7fd2cf3a4d7 (patch) | |
tree | 0f7cad7c0bb484af673e583c9906cfa6a2e09a10 /utils/weights.h | |
parent | 895dfd64ea5599ab16981cbfb538ec5f4073c8c1 (diff) |
Save/load weights in stream mira
Diffstat (limited to 'utils/weights.h')
-rw-r--r-- | utils/weights.h | 5 |
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(); }; |