[mlpack-git] master: Add empty Serialize() methods to initialization policies. (14e794d)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Tue Sep 29 09:33:31 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/cbeb3ea17262b7c5115247dc217e316c529249b7...f85a9b22f3ce56143943a2488c05c2810d6b2bf3
>---------------------------------------------------------------
commit 14e794d0065ca5bc4f4b9be4cd193ff38d721dfc
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Sep 25 12:13:44 2015 +0000
Add empty Serialize() methods to initialization policies.
>---------------------------------------------------------------
14e794d0065ca5bc4f4b9be4cd193ff38d721dfc
src/mlpack/methods/amf/init_rules/average_init.hpp | 4 ++++
src/mlpack/methods/amf/init_rules/random_acol_init.hpp | 4 ++++
src/mlpack/methods/amf/init_rules/random_init.hpp | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/src/mlpack/methods/amf/init_rules/average_init.hpp b/src/mlpack/methods/amf/init_rules/average_init.hpp
index 1cf711c..3379c98 100644
--- a/src/mlpack/methods/amf/init_rules/average_init.hpp
+++ b/src/mlpack/methods/amf/init_rules/average_init.hpp
@@ -68,6 +68,10 @@ class AverageInitialization
W = W + avgV;
H = H + avgV;
}
+
+ //! Serialize the object (in this case, there is nothing to do).
+ template<typename Archive>
+ void Serialize(Archive& /* ar */, const unsigned int /* version */) { }
};
} // namespace amf
diff --git a/src/mlpack/methods/amf/init_rules/random_acol_init.hpp b/src/mlpack/methods/amf/init_rules/random_acol_init.hpp
index 3bf9ad3..9f9465a 100644
--- a/src/mlpack/methods/amf/init_rules/random_acol_init.hpp
+++ b/src/mlpack/methods/amf/init_rules/random_acol_init.hpp
@@ -76,6 +76,10 @@ class RandomAcolInitialization
// Initialize H to random values.
H.randu(r, m);
}
+
+ //! Serialize the object (in this case, there is nothing to serialize).
+ template<typename Archive>
+ void Serialize(Archive& /* ar */, const unsigned int /* version */) { }
};
} // namespace amf
diff --git a/src/mlpack/methods/amf/init_rules/random_init.hpp b/src/mlpack/methods/amf/init_rules/random_init.hpp
index 2a5b45f..f9cd7c2 100644
--- a/src/mlpack/methods/amf/init_rules/random_init.hpp
+++ b/src/mlpack/methods/amf/init_rules/random_init.hpp
@@ -45,6 +45,10 @@ class RandomInitialization
W.randu(n, r);
H.randu(r, m);
}
+
+ //! Serialize the object (in this case, there is nothing to serialize).
+ template<typename Archive>
+ void Serialize(Archive& /* ar */, const unsigned int /* version */) { }
};
} // namespace amf
More information about the mlpack-git
mailing list