[mlpack-git] [mlpack/mlpack] Spill trees (#747)
notifications at github.com
Sun Aug 14 16:45:09 EDT 2016
> @@ -249,6 +318,9 @@ void NSModel<SortPolicy>::Serialize(Archive& ar,
> const unsigned int /* version */)
> ar & data::CreateNVP(treeType, "treeType");
> + ar & data::CreateNVP(leafSize, "leafSize");
> + ar & data::CreateNVP(tau, "tau");
> + ar & data::CreateNVP(rho, "rho");
I hate to always be talking about reverse compatibility, but this is reverse-incompatible, since tau, rho, and leafSize aren't part of the previous saved models. So the thing to do is to uncomment the `version` parameter, and use `version == 0` to assume that leafSize, tau, and rho aren't available (and set them to defaults), and `version == 1` to assume that leafSize, tau, and rho are available.
You'll need to then set the serialization version. For `LSHSearch`, that's done like this:
//! Set the serialization version of the LSHSearch class.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git