[mlpack-git] master: implement serialization (debb7ca)

gitdub at mlpack.org gitdub at mlpack.org
Sat Feb 27 11:46:30 EST 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/a2e57d617e952f1ea2fda8a23e1c6bd2f78beb6d...1bedf15126f6bd0bc93a3233914ac95486a3c0da

>---------------------------------------------------------------

commit debb7ca026231348cb32bb8a046297e72da846d0
Author: stereomatchingkiss <stereomatchingkiss at gmail.com>
Date:   Sun Feb 28 00:46:30 2016 +0800

    implement serialization


>---------------------------------------------------------------

debb7ca026231348cb32bb8a046297e72da846d0
 src/mlpack/methods/ann/cnn_impl.hpp | 3 +++
 src/mlpack/methods/ann/ffn_impl.hpp | 3 +++
 src/mlpack/methods/ann/rnn_impl.hpp | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/src/mlpack/methods/ann/cnn_impl.hpp b/src/mlpack/methods/ann/cnn_impl.hpp
index 3b568c4..d7520ce 100644
--- a/src/mlpack/methods/ann/cnn_impl.hpp
+++ b/src/mlpack/methods/ann/cnn_impl.hpp
@@ -10,6 +10,8 @@
 // In case it hasn't been included yet.
 #include "cnn.hpp"
 
+#include <mlpack/core/util/tuple_serialize.hpp>
+
 namespace mlpack {
 namespace ann /** Artificial Neural Network. */ {
 
@@ -265,6 +267,7 @@ LayerTypes, OutputLayerType, InitializationRuleType, PerformanceFunction
 >::Serialize(Archive& ar, const unsigned int /* version */)
 {
   ar & data::CreateNVP(parameter, "parameter");
+  ar & data::CreateNVP(network, "network");
 }
 
 } // namespace ann
diff --git a/src/mlpack/methods/ann/ffn_impl.hpp b/src/mlpack/methods/ann/ffn_impl.hpp
index 4ab1fa1..6f085c6 100644
--- a/src/mlpack/methods/ann/ffn_impl.hpp
+++ b/src/mlpack/methods/ann/ffn_impl.hpp
@@ -10,6 +10,8 @@
 // In case it hasn't been included yet.
 #include "ffn.hpp"
 
+#include <mlpack/core/util/tuple_serialize.hpp>
+
 namespace mlpack {
 namespace ann /** Artificial Neural Network. */ {
 
@@ -269,6 +271,7 @@ LayerTypes, OutputLayerType, InitializationRuleType, PerformanceFunction
 >::Serialize(Archive& ar, const unsigned int /* version */)
 {
   ar & data::CreateNVP(parameter, "parameter");
+  ar & data::CreateNVP(network, "network");
 }
 
 } // namespace ann
diff --git a/src/mlpack/methods/ann/rnn_impl.hpp b/src/mlpack/methods/ann/rnn_impl.hpp
index 0104451..12cd5ff 100644
--- a/src/mlpack/methods/ann/rnn_impl.hpp
+++ b/src/mlpack/methods/ann/rnn_impl.hpp
@@ -10,6 +10,8 @@
 // In case it hasn't been included yet.
 #include "rnn.hpp"
 
+#include <mlpack/core/util/tuple_serialize.hpp>
+
 namespace mlpack {
 namespace ann /** Artificial Neural Network. */ {
 
@@ -328,6 +330,7 @@ LayerTypes, OutputLayerType, InitializationRuleType, PerformanceFunction
 >::Serialize(Archive& ar, const unsigned int /* version */)
 {
   ar & data::CreateNVP(parameter, "parameter");
+  ar & data::CreateNVP(network, "network");
 }
 
 } // namespace ann




More information about the mlpack-git mailing list