14 #ifndef MLPACK_CORE_DATA_LOAD_HPP 15 #define MLPACK_CORE_DATA_LOAD_HPP 62 bool Load(
const std::string& filename,
63 arma::Mat<eT>& matrix,
64 const bool fatal =
false,
65 const bool transpose =
true);
74 extern template bool Load<int>(
const std::string&,
80 extern template bool Load<unsigned int>(
const std::string&,
81 arma::Mat<unsigned int>&,
85 extern template bool Load<unsigned long>(
const std::string&,
86 arma::Mat<unsigned long>&,
90 extern template bool Load<unsigned long long>(
const std::string&,
91 arma::Mat<unsigned long long>&,
95 extern template bool Load<float>(
const std::string&,
100 extern template bool Load<double>(
const std::string&,
136 template<
typename eT>
137 bool Load(
const std::string& filename,
139 const bool fatal =
false);
168 template<
typename eT>
169 bool Load(
const std::string& filename,
170 arma::Row<eT>& rowvec,
171 const bool fatal =
false);
205 template<
typename eT,
typename PolicyType>
206 bool Load(
const std::string& filename,
207 arma::Mat<eT>& matrix,
208 DatasetMapper<PolicyType>& info,
209 const bool fatal =
false,
210 const bool transpose =
true);
219 extern template bool Load<int, IncrementPolicy>(
222 DatasetMapper<IncrementPolicy>&,
226 extern template bool Load<arma::u32, IncrementPolicy>(
228 arma::Mat<arma::u32>&,
229 DatasetMapper<IncrementPolicy>&,
233 extern template bool Load<arma::u64, IncrementPolicy>(
235 arma::Mat<arma::u64>&,
236 DatasetMapper<IncrementPolicy>&,
240 extern template bool Load<float, IncrementPolicy>(
243 DatasetMapper<IncrementPolicy>&,
247 extern template bool Load<double, IncrementPolicy>(
250 DatasetMapper<IncrementPolicy>&,
284 bool Load(
const std::string& filename,
285 const std::string& name,
287 const bool fatal =
false,
294 #include "load_model_impl.hpp" 296 #include "load_vec_impl.hpp"
format
Define the formats we can read through boost::serialization.
The core includes that mlpack expects; standard C++ includes and Armadillo.
bool Load(const std::string &filename, arma::Mat< eT > &matrix, const bool fatal=false, const bool transpose=true)
Loads a matrix from file, guessing the filetype from the extension.