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);
68 extern template bool Load<int>(
const std::string&, arma::Mat<int>&,
const bool,
const bool);
69 extern template bool Load<size_t>(
const std::string&, arma::Mat<size_t>&,
const bool,
const bool);
70 extern template bool Load<float>(
const std::string&, arma::Mat<float>&,
const bool,
const bool);
71 extern template bool Load<double>(
const std::string&, arma::Mat<double>&,
const bool,
const bool);
74 extern template bool Load<unsigned long long>(
const std::string&, arma::Mat<unsigned long long>&,
const bool,
const bool);
104 template<
typename eT>
105 bool Load(
const std::string& filename,
106 arma::Col<eT>& colvec,
107 const bool fatal =
false);
136 template<
typename eT>
137 bool Load(
const std::string& filename,
138 arma::Row<eT>& colvec,
139 const bool fatal =
false);
173 template<
typename eT,
typename PolicyType>
174 bool Load(
const std::string& filename,
175 arma::Mat<eT>& matrix,
176 DatasetMapper<PolicyType>& info,
177 const bool fatal =
false,
178 const bool transpose =
true);
181 DatasetMapper<IncrementPolicy>&,
182 const bool,
const bool);
185 DatasetMapper<IncrementPolicy>&,
186 const bool,
const bool);
189 DatasetMapper<IncrementPolicy>&,
190 const bool,
const bool);
193 DatasetMapper<IncrementPolicy>&,
194 const bool,
const bool);
197 DatasetMapper<IncrementPolicy>&,
198 const bool,
const bool);
226 bool Load(
const std::string& filename,
227 const std::string& name,
229 const bool fatal =
false,
236 #include "load_model_impl.hpp"
template bool Load< size_t >(const std::string &, arma::Mat< size_t > &, const bool, const bool)
format
Define the formats we can read through boost::serialization.
The core includes that mlpack expects; standard C++ includes and Armadillo.
template bool Load< double >(const std::string &, arma::Mat< double > &, const bool, const bool)
template bool Load< size_t, IncrementPolicy >(const std::string &, arma::Mat< size_t > &, DatasetMapper< IncrementPolicy > &, const bool, const bool)
template bool Load< double, IncrementPolicy >(const std::string &, arma::Mat< double > &, DatasetMapper< IncrementPolicy > &, const bool, const bool)
template bool Load< int, IncrementPolicy >(const std::string &, arma::Mat< int > &, DatasetMapper< IncrementPolicy > &, const bool, const bool)
template bool Load< unsigned long long, IncrementPolicy >(const std::string &, arma::Mat< unsigned long long > &, DatasetMapper< IncrementPolicy > &, const bool, const bool)
template bool Load< unsigned long long >(const std::string &, arma::Mat< unsigned long long > &, const bool, const bool)
template bool Load< int >(const std::string &, arma::Mat< int > &, const bool, const bool)
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.
template bool Load< float >(const std::string &, arma::Mat< float > &, const bool, const bool)
template bool Load< float, IncrementPolicy >(const std::string &, arma::Mat< float > &, DatasetMapper< IncrementPolicy > &, const bool, const bool)