boost::serialization --> cereal bindings/

Signed-off-by: Omar Shrit <omar@shrit.me>
This commit is contained in:
Omar Shrit
2020-06-30 19:13:30 +02:00
parent d9f50304f4
commit 5bd3cd74d1
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ if (BUILD_JULIA_BINDINGS)
"\"\"\"\n"
" serialize_bin(stream::IO, model)\n"
"\n"
"Serialize an mlpack model `model` in the binary boost::serialization\n"
"Serialize an mlpack model `model` in the binary cereal\n"
"format to the given `stream`. Example:\n"
"\n"
"```julia\n"
@@ -124,7 +124,7 @@ if (BUILD_JULIA_BINDINGS)
"lr_model = mlpack.deserialize_bin(stream, LogisticRegression)\n"
"```\n"
"\n"
"Only use this if you have saved the model in the boost::serialization\n"
"Only use this if you have saved the model in the cereal\n"
"binary format using `serialize_bin()` or an mlpack binding in another\n"
"language! If you used `Serialization.serialize()` to serialize your\n"
"model, then use `Serialization.deserialize()` to deserialize it.\n"
@@ -2,7 +2,7 @@
* @file bindings/python/mlpack/serialization.hpp
* @author Ryan Curtin
*
* Simple utilities for boost::serialization.
* Simple utilities for cereal.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
@@ -25,7 +25,7 @@ std::string SerializeOut(T* t, const std::string& name)
{
boost::archive::binary_oarchive b(oss);
b << boost::serialization::make_nvp(name.c_str(), *t);
b << cereal::make_nvp(name.c_str(), *t);
}
return oss.str();
}
@@ -36,7 +36,7 @@ void SerializeIn(T* t, const std::string& str, const std::string& name)
std::istringstream iss(str);
boost::archive::binary_iarchive b(iss);
b >> boost::serialization::make_nvp(name.c_str(), *t);
b >> cereal::make_nvp(name.c_str(), *t);
}
} // namespace python