14#ifndef MLPACK_CORE_DATA_LOAD_HPP
15#define MLPACK_CORE_DATA_LOAD_HPP
66bool Load(
const std::string& filename,
67 arma::Mat<eT>& matrix,
68 const bool fatal =
false,
69 const bool transpose =
true,
70 const arma::file_type inputLoadType = arma::auto_detect);
102bool Load(
const std::string& filename,
103 arma::SpMat<eT>& matrix,
104 const bool fatal =
false,
105 const bool transpose =
true);
114extern template bool Load<int>(
const std::string&,
118 const arma::file_type);
121extern template bool Load<unsigned int>(
const std::string&,
122 arma::Mat<unsigned int>&,
125 const arma::file_type);
127extern template bool Load<unsigned long>(
const std::string&,
128 arma::Mat<unsigned long>&,
131 const arma::file_type);
133extern template bool Load<unsigned long long>(
const std::string&,
134 arma::Mat<unsigned long long>&,
137 const arma::file_type);
139extern template bool Load<float>(
const std::string&,
143 const arma::file_type);
145extern template bool Load<double>(
const std::string&,
149 const arma::file_type);
151extern template bool Load<int>(
const std::string&,
155 const arma::file_type);
157extern template bool Load<unsigned int>(
const std::string&,
158 arma::SpMat<unsigned int>&,
162extern template bool Load<unsigned long>(
const std::string&,
163 arma::SpMat<unsigned long>&,
167extern template bool Load<unsigned long long>(
const std::string&,
168 arma::SpMat<unsigned long long>&,
172extern template bool Load<float>(
const std::string&,
177extern template bool Load<double>(
const std::string&,
178 arma::SpMat<double>&,
214bool Load(
const std::string& filename,
216 const bool fatal =
false);
246bool Load(
const std::string& filename,
247 arma::Row<eT>& rowvec,
248 const bool fatal =
false);
282template<
typename eT,
typename PolicyType>
283bool Load(
const std::string& filename,
284 arma::Mat<eT>& matrix,
286 const bool fatal =
false,
287 const bool transpose =
true);
296extern template bool Load<int, IncrementPolicy>(
303extern template bool Load<arma::u32, IncrementPolicy>(
305 arma::Mat<arma::u32>&,
310extern template bool Load<arma::u64, IncrementPolicy>(
312 arma::Mat<arma::u64>&,
317extern template bool Load<float, IncrementPolicy>(
324extern template bool Load<double, IncrementPolicy>(
361bool Load(
const std::string& filename,
362 const std::string& name,
364 const bool fatal =
false,
381bool Load(
const std::string& filename,
382 arma::Mat<eT>& matrix,
384 const bool fatal =
false);
396bool 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"
Auxiliary information for a dataset, including mappings to/from strings (or other types) and the data...
Implements meta-data of images required by data::Load and data::Save for loading and saving images in...
bool LoadImage(const std::string &filename, arma::Mat< unsigned char > &matrix, ImageInfo &info, const bool fatal=false)
format
Define the formats we can read through boost::serialization.
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.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.