[mlpack] 44/53: Fix serialization bug.

Barak A. Pearlmutter barak+git at pearlmutter.net
Mon Nov 14 00:46:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit 91564ff7f1f706eba03d19009d3d53c206bdfafe
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sun Oct 30 14:40:47 2016 -0400

    Fix serialization bug.
---
 src/mlpack/methods/approx_kfn/qdafn_impl.hpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mlpack/methods/approx_kfn/qdafn_impl.hpp b/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
index bb8408c..ab9bce6 100644
--- a/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
+++ b/src/mlpack/methods/approx_kfn/qdafn_impl.hpp
@@ -176,6 +176,8 @@ void QDAFN<MatType>::Serialize(Archive& ar, const unsigned int /* version */)
   ar & CreateNVP(projections, "projections");
   ar & CreateNVP(sIndices, "sIndices");
   ar & CreateNVP(sValues, "sValues");
+  if (Archive::is_loading::value)
+    candidateSet.clear();
   ar & CreateNVP(candidateSet, "candidateSet");
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list