[mlpack-git] [mlpack/mlpack] GMM Serialization function incorrectly named. (#644)

Ryan Curtin notifications at github.com
Tue May 24 09:51:22 EDT 2016


Hi there,

This is because the mlpack code style uses capitalized function names.  So we built an adapter to use boost::serialization but at this time there is not one for cereal.  You could use it like this...

```
boost::archive::xml_oarchive oa(...);
mlpack::gmm::GMM<> gmm(...);
oa << mlpack::data::CreateNVP(gmm, "gmm");
```

So, basically, use `mlpack::data::CreateNVP()` to pass to `boost::serialization` (and maybe cereal?  I don't know if that will work) instead of passing the object directly.

If you are interested in the way this works, take a look at `src/mlpack/core/data/serialization_shim.hpp`, but be warned, that is probably the most complex C++ in the whole library.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/644#issuecomment-221276059
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160524/c1d36fc8/attachment-0001.html>


More information about the mlpack-git mailing list