This class implements an specialization of the AnnParser for csv files.
More...
#include <AnnParser.h>
|
std::shared_ptr< ModelData > | parse_model (const std::string modelPath, const std::string modelName) |
| Parsing function which is used to get the ANN data from a csv file.
|
|
virtual | ~ModelParser ()=default |
| Virtual desctructor to enable inheritance.
|
|
This class implements an specialization of the AnnParser for csv files.
This abstarct class is used to implement an ANN file parser for csv files based on the interface provided by AnnParser.
◆ _check_if_layer_indicator()
bool AnnParserCsv::_check_if_layer_indicator |
( |
int | number | ) |
|
|
private |
Checks if passed number is a layer indicator.
- Parameters
-
[in] | number | Number to be checked |
- Returns
- true if number is an layer indicator, otherwise false is returned
◆ _csv_to_double_matrix()
std::vector< std::vector< double > > AnnParserCsv::_csv_to_double_matrix |
( |
std::string | fileName | ) |
|
|
private |
Parses the content of an csv file into a double matrix.
- Parameters
-
[in] | fileName | name of the the csv file that should be parsed |
- Returns
- returns a 2d vector(double) containing the data from the csv file
◆ _csv_to_string_matrix()
std::vector< std::vector< std::string > > AnnParserCsv::_csv_to_string_matrix |
( |
std::string | fileName | ) |
|
|
private |
Parses the content of an csv file into a string matrix.
- Parameters
-
[in] | fileName | name of the the csv file that should be parsed |
- Returns
- returns a 2d vector(string) containing the data from the csv file
◆ _get_layer_index_from_indicator()
int AnnParserCsv::_get_layer_index_from_indicator |
( |
int | indicator | ) |
|
|
private |
Extracts layer index from a layer indicator.
- Parameters
-
[in] | indicator | Indicator from which the layer index should get |
- Returns
- Layer index
◆ _parse_bias_weights()
Parses the bias weights.
- Parameters
-
[in] | structure | struct containing the information regarding the anns structure |
[out] | weights | struct containing the anns weights |
◆ _parse_config_file()
void AnnParserCsv::_parse_config_file |
( |
AnnStructure & | structure | ) |
|
|
private |
Parses the configuration csv file.
- Parameters
-
[out] | structure | struct containing the information regarding the anns structure |
◆ _parse_input_weights()
Parses the input weights.
- Parameters
-
[in] | structure | struct containing the information regarding the anns structure |
[out] | weights | struct containing the anns weights |
◆ _parse_layer_weights()
Parses the layer weights.
- Parameters
-
[in] | structure | struct containing the information regarding the anns structure |
[out] | weights | struct containing the anns weights |
◆ _parse_scalers()
void AnnParserCsv::_parse_scalers |
( |
std::shared_ptr< ScalerData > | inputScalerData, |
|
|
std::shared_ptr< ScalerData > | outputScalerData, |
|
|
const AnnStructure & | structure ) |
|
private |
Parses the input and output scalers.
- Parameters
-
[out] | inputScalerData | struct containing the parameters used for input sclaing |
[out] | outputScalerData | struct containing the parameters used for output scaling |
[in] | structure | struct containing the information regarding the anns structure |
◆ parse_model()
std::shared_ptr< ModelData > AnnParserCsv::parse_model |
( |
const std::string | modelPath, |
|
|
const std::string | modelName ) |
|
virtual |
Parsing function which is used to get the ANN data from a csv file.
- Parameters
-
[in] | modelPath | Path to the location of the ANN file |
[in] | modelName | name of the network (either foldername in which csv files are stored) |
- Returns
- returns modelData struct containing the information defining the ann
Implements melon::AnnParser.
◆ LAYER_INDICATOR_BASE
const int melon::AnnParserCsv::LAYER_INDICATOR_BASE = 900 |
|
private |
The documentation for this class was generated from the following files:
- C:/Data/Git/MeLOn/feedforward neural network/model/inc/AnnParser.h
- C:/Data/Git/MeLOn/feedforward neural network/model/src/AnnParserCSV.cpp