14 #ifndef MLPACK_CORE_DATA_LOAD_HPP
15 #define MLPACK_CORE_DATA_LOAD_HPP
67 arma::Mat<eT>& matrix,
68 const bool fatal =
false,
69 const bool transpose =
true,
70 const arma::file_type inputLoadType = arma::auto_detect);
101 template<
typename eT>
103 arma::SpMat<eT>& matrix,
104 const bool fatal =
false,
105 const bool transpose =
true);
118 const arma::file_type);
121 extern template bool Load<unsigned int>(
const std::string&,
122 arma::Mat<unsigned int>&,
125 const arma::file_type);
127 extern template bool Load<unsigned long>(
const std::string&,
128 arma::Mat<unsigned long>&,
131 const arma::file_type);
133 extern template bool Load<unsigned long long>(
const std::string&,
134 arma::Mat<unsigned long long>&,
137 const arma::file_type);
139 extern template bool Load<float>(
const std::string&,
143 const arma::file_type);
145 extern template bool Load<double>(
const std::string&,
149 const arma::file_type);
155 const arma::file_type);
157 extern template bool Load<unsigned int>(
const std::string&,
158 arma::SpMat<unsigned int>&,
162 extern template bool Load<unsigned long>(
const std::string&,
163 arma::SpMat<unsigned long>&,
167 extern template bool Load<unsigned long long>(
const std::string&,
168 arma::SpMat<unsigned long long>&,
172 extern template bool Load<float>(
const std::string&,
177 extern template bool Load<double>(
const std::string&,
178 arma::SpMat<double>&,
213 template<
typename eT>
216 const bool fatal =
false);
245 template<
typename eT>
247 arma::Row<eT>& rowvec,
248 const bool fatal =
false);
282 template<
typename eT,
typename PolicyType>
284 arma::Mat<eT>& matrix,
285 DatasetMapper<PolicyType>& info,
286 const bool fatal =
false,
287 const bool transpose =
true);
296 extern template bool Load<int, IncrementPolicy>(
299 DatasetMapper<IncrementPolicy>&,
303 extern template bool Load<arma::u32, IncrementPolicy>(
305 arma::Mat<arma::u32>&,
306 DatasetMapper<IncrementPolicy>&,
310 extern template bool Load<arma::u64, IncrementPolicy>(
312 arma::Mat<arma::u64>&,
313 DatasetMapper<IncrementPolicy>&,
317 extern template bool Load<float, IncrementPolicy>(
320 DatasetMapper<IncrementPolicy>&,
324 extern template bool Load<double, IncrementPolicy>(
327 DatasetMapper<IncrementPolicy>&,
364 const bool fatal =
false,
380 template<
typename eT>
382 arma::Mat<eT>& matrix,
384 const bool fatal =
false);
395 template<
typename eT>
396 bool Load(
const std::vector<std::string>& files,
397 arma::Mat<eT>& matrix,
399 const bool fatal =
false);
403 arma::Mat<unsigned char>& matrix,
405 const bool fatal =
false);
411 #include "load_model_impl.hpp"
413 #include "load_vec_impl.hpp"
415 #include "load_image_impl.hpp"
format
Define the formats we can read through boost::serialization.
The core includes that mlpack expects; standard C++ includes and Armadillo.
bool LoadImage(const std::string &filename, arma::Mat< unsigned char > &matrix, ImageInfo &info, const bool fatal=false)
bool Load(const std::string &filename, arma::Mat< eT > &matrix, const bool fatal=false, const bool transpose=true, const arma::file_type inputLoadType=arma::auto_detect)
Loads a matrix from file, guessing the filetype from the extension.
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$