MachineIntelligenceCore:Algorithms
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MNISTPatchImporter.hpp
Go to the documentation of this file.
1 
23 #ifndef SRC_importers_MNISTPATCHIMAGEIMPORTER_HPP_
24 #define SRC_importers_MNISTPATCHIMAGEIMPORTER_HPP_
25 
26 #include <importers/Importer.hpp>
27 #include <types/MNISTTypes.hpp>
28 
29 namespace mic {
30 namespace importers {
31 
36 class MNISTPatchImporter : public mic::importers::Importer<mic::types::MatrixXf, unsigned int> {
37 public:
42  MNISTPatchImporter(std::string node_name_ = "mnist_patch_importer");
43 
47  virtual ~MNISTPatchImporter() { };
48 
53  bool importData();
54 
59  void setDataFilename(std::string data_filename_) {
60  data_filename = data_filename_;
61  }
62 
67  void setLabelsFilename(std::string labels_filename_) {
68  labels_filename = labels_filename_;
69  }
70 
75 
79  size_t getPatchSize() { return patch_size; }
80 
81 private:
85  size_t image_width;
86 
90  size_t image_height;
91 
95  mic::configuration::Property<std::string> data_filename;
96 
100  mic::configuration::Property<std::string> labels_filename;
101 
105  mic::configuration::Property<size_t> patch_size;
106 
110  mic::configuration::Property<int> samples_limit;
111 };
112 
113 } /* namespace importers */
114 } /* namespace mic */
115 
116 
117 #endif /* SRC_importers_MNISTPATCHIMAGEIMPORTER_HPP_ */
mic::configuration::Property< std::string > labels_filename
mic::configuration::Property< int > samples_limit
MNISTPatchImporter(std::string node_name_="mnist_patch_importer")
void setLabelsFilename(std::string labels_filename_)
mic::configuration::Property< std::string > data_filename
mic::configuration::Property< size_t > patch_size
Parent class for all data importers.
Definition: Importer.hpp:51
Contains declaration (and definition) of base template class of all data importers.
Importer responsible for importing/loading MNIST images with labels.
void setDataFilename(std::string data_filename_)