MachineIntelligenceCore:Algorithms
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Importer.hpp
Go to the documentation of this file.
1 
23 #ifndef SRC_importers_IMPORTER_HPP_
24 #define SRC_importers_IMPORTER_HPP_
25 
26 #include <vector>
27 #include <stdexcept>
28 
29 #include <logger/Log.hpp>
30 #include <configuration/PropertyTree.hpp>
31 
32 #include <types/Batch.hpp>
33 
34 namespace mic {
35 
41 namespace importers {
42 
50 template <typename DataType, typename LabelType>
51 class Importer : public mic::types::Batch<DataType, LabelType>, public mic::configuration::PropertyTree {
52 public:
58  Importer(std::string node_name_, size_t batch_size_ = 1) : mic::types::Batch<DataType, LabelType>::Batch(batch_size_), PropertyTree(node_name_)
59  {
60  // Register properties - so their values can be overridden (read from the configuration file).
61  }
62 
66  virtual ~Importer() {
67  }
68 
73  virtual bool importData() = 0;
74 
75 };
76 
77 } /* namespace importers */
78 } /* namespace mic */
79 
80 #endif /* SRC_importers_IMPORTER_HPP_ */
Template class storing the sample batches. A batch is stored in fact as three vectors, containing data, labels and sample numbers respectively.
Definition: Batch.hpp:44
Importer(std::string node_name_, size_t batch_size_=1)
Definition: Importer.hpp:58
Parent class for all data importers.
Definition: Importer.hpp:51
virtual bool importData()=0
Batch(size_t batch_size_=1)
Definition: Batch.hpp:49