[mlpack-git] master: implement serialize (2cbd958)
gitdub at mlpack.org
gitdub at mlpack.org
Sat Feb 27 03:22:31 EST 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/a2e57d617e952f1ea2fda8a23e1c6bd2f78beb6d...1bedf15126f6bd0bc93a3233914ac95486a3c0da
>---------------------------------------------------------------
commit 2cbd9589ace8e40fc5af49bd70297d2bd8f4a855
Author: stereomatchingkiss <stereomatchingkiss at gmail.com>
Date: Sat Feb 27 16:22:31 2016 +0800
implement serialize
>---------------------------------------------------------------
2cbd9589ace8e40fc5af49bd70297d2bd8f4a855
src/mlpack/methods/ann/layer/conv_layer.hpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mlpack/methods/ann/layer/conv_layer.hpp b/src/mlpack/methods/ann/layer/conv_layer.hpp
index 06f38a8..287d587 100644
--- a/src/mlpack/methods/ann/layer/conv_layer.hpp
+++ b/src/mlpack/methods/ann/layer/conv_layer.hpp
@@ -179,6 +179,15 @@ class ConvLayer
}
}
+ /**
+ * Serialize the layer
+ */
+ template<typename Archive>
+ void Serialize(Archive& ar, const unsigned int /* version */)
+ {
+ ar & data::CreateNVP(weights, "weights");
+ }
+
//! Get the weights.
OutputDataType& Weights() const { return weights; }
//! Modify the weights.
More information about the mlpack-git
mailing list