|
MachineIntelligenceCore:Algorithms
|
Parent class for all data importers. More...
#include <Importer.hpp>


Public Member Functions | |
| Importer (std::string node_name_, size_t batch_size_=1) | |
| virtual | ~Importer () |
| virtual bool | importData ()=0 |
Public Member Functions inherited from mic::types::Batch< DataType, LabelType > | |
| Batch (size_t batch_size_=1) | |
| Batch (const mic::types::Batch< DataType, LabelType > &batch_) | |
| mic::types::Batch< DataType, LabelType > & | operator= (const mic::types::Batch< DataType, LabelType > &batch_) |
| virtual | ~Batch () |
| std::vector< std::shared_ptr < DataType > > & | data () |
| Returns sample data. More... | |
| std::vector< std::shared_ptr < LabelType > > & | labels () |
| Returns sample labels. More... | |
| std::vector< size_t > & | indices () |
| Returns sample numbers (sample "positions" in original dataset). More... | |
| std::shared_ptr< DataType > | data (size_t index_) |
| std::shared_ptr< LabelType > | labels (size_t index_) |
| std::vector< size_t > | indices (size_t index_) |
| size_t | size () |
| void | setBatchSize (size_t batch_size_) |
| size_t | getBatchSize () |
| mic::types::Batch< DataType, LabelType > | getRandomBatch () |
| mic::types::Batch< DataType, LabelType > | getNextBatch () |
| mic::types::Batch< DataType, LabelType > | getBatch (std::vector< size_t > indices_) |
| mic::types::Batch< DataType, LabelType > | getBatchDirect (std::vector< size_t > indices_) |
| bool | isLastBatch () |
| mic::types::Sample< DataType, LabelType > | getRandomSample () |
| mic::types::Sample< DataType, LabelType > | getNextSample () |
| mic::types::Sample< DataType, LabelType > | getSample (size_t index_) |
| mic::types::Sample< DataType, LabelType > | getSampleDirect (size_t index_) |
| void | setNextSampleIndex (size_t index_=0) |
| bool | isLastSample () |
| virtual void | add (mic::types::Sample< DataType, LabelType > sample_) |
| virtual void | add (std::shared_ptr< DataType > data_, std::shared_ptr< LabelType > label_, size_t index_) |
| virtual void | add (std::shared_ptr< DataType > data_, std::shared_ptr< LabelType > label_) |
| void | countClasses () |
| size_t | classes () |
Additional Inherited Members | |
Protected Attributes inherited from mic::types::Batch< DataType, LabelType > | |
| size_t | next_sample_index |
| size_t | batch_size |
| std::random_device | rd |
| std::mt19937_64 | rng_mt19937_64 |
| std::vector< std::shared_ptr < DataType > > | sample_data |
| Stores the data. More... | |
| std::vector< std::shared_ptr < LabelType > > | sample_labels |
| Stores labels. More... | |
| std::vector< size_t > | sample_indices |
| Stores sample indices (sample "positions" in original dataset). More... | |
| size_t | number_of_classes |
Parent class for all data importers.
| DataType | Template parameter defining the imported datatype. |
| LabelType | Template parameters defining the datatype of label. |
Definition at line 51 of file Importer.hpp.
|
inline |
Constructor. Initializes random generator and sets index to zero. Registers index property.
| node_name_ | Name of the node in configuration file. |
| batch_size_ | Size of the batch. |
Definition at line 58 of file Importer.hpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 66 of file Importer.hpp.
|
pure virtual |
Abstract method responsible for importing/loading the samples.
Implemented in mic::importers::IBMFontMatrixImporter, mic::importers::CIFARImporter< eT >, mic::importers::MNISTMatrixImporter< T >, mic::importers::BMPImporter< eT >, mic::importers::STL10MatrixImporter, mic::importers::MNISTPatchImporter, and mic::importers::RawTextImporter.