14 #ifndef MLPACK_CORE_DATA_LOAD_HPP 15 #define MLPACK_CORE_DATA_LOAD_HPP 63 bool Load(
const std::string& filename,
64 arma::Mat<eT>& matrix,
65 const bool fatal =
false,
66 const bool transpose =
true);
75 extern template bool Load<int>(
const std::string&,
81 extern template bool Load<unsigned int>(
const std::string&,
82 arma::Mat<unsigned int>&,
86 extern template bool Load<unsigned long>(
const std::string&,
87 arma::Mat<unsigned long>&,
91 extern template bool Load<unsigned long long>(
const std::string&,
92 arma::Mat<unsigned long long>&,
96 extern template bool Load<float>(
const std::string&,
101 extern template bool Load<double>(
const std::string&,
137 template<
typename eT>
138 bool Load(
const std::string& filename,
140 const bool fatal =
false);
169 template<
typename eT>
170 bool Load(
const std::string& filename,
171 arma::Row<eT>& rowvec,
172 const bool fatal =
false);
206 template<
typename eT,
typename PolicyType>
207 bool Load(
const std::string& filename,
208 arma::Mat<eT>& matrix,
209 DatasetMapper<PolicyType>& info,
210 const bool fatal =
false,
211 const bool transpose =
true);
220 extern template bool Load<int, IncrementPolicy>(
223 DatasetMapper<IncrementPolicy>&,
227 extern template bool Load<arma::u32, IncrementPolicy>(
229 arma::Mat<arma::u32>&,
230 DatasetMapper<IncrementPolicy>&,
234 extern template bool Load<arma::u64, IncrementPolicy>(
236 arma::Mat<arma::u64>&,
237 DatasetMapper<IncrementPolicy>&,
241 extern template bool Load<float, IncrementPolicy>(
244 DatasetMapper<IncrementPolicy>&,
248 extern template bool Load<double, IncrementPolicy>(
251 DatasetMapper<IncrementPolicy>&,
285 bool Load(
const std::string& filename,
286 const std::string& name,
288 const bool fatal =
false,
306 template<
typename eT>
307 bool Load(
const std::string& filename,
308 arma::Mat<eT>& matrix,
310 const bool fatal =
false,
311 const bool transpose =
true);
323 template<
typename eT>
324 bool Load(
const std::vector<std::string>& files,
325 arma::Mat<eT>& matrix,
327 const bool fatal =
false,
328 const bool transpose =
true);
336 #include "load_model_impl.hpp" 338 #include "load_vec_impl.hpp" 340 #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 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.