 |
MeLOn
|
Go to the documentation of this file.
34 class AnnParser:
public ModelParser {
56 virtual std::shared_ptr<ModelData>
parse_model(
const std::string modelPath,
const std::string modelName) = 0;
65 class AnnParserCsv :
public AnnParser {
103 void _parse_scalers(std::shared_ptr<ScalerData> inputScalerData, std::shared_ptr<ScalerData> outputScalerData,
const AnnStructure& structure);
161 std::shared_ptr<ModelData>
parse_model(
const std::string modelPath,
const std::string modelName);
170 class AnnParserXml :
public AnnParser {
207 std::shared_ptr<ModelData>
parse_model(
const std::string modelPath,
const std::string modelName);
MODEL_FILE_TYPE
Enum for representing the parsable filetypes.
Definition: modelParser.h:43
void _parse_bias_weights(const AnnStructure &structure, AnnWeights &weights)
Parses the bias weights.
Definition: AnnParserCSV.cpp:177
virtual std::shared_ptr< ModelData > parse_model(const std::string modelPath, const std::string modelName)=0
Abstract function for defining the structure of the parsing function which is used to get the ANN dat...
XMLError
Definition: tinyxml2.h:522
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 xml file.
Definition: AnnParserXML.cpp:26
std::vector< std::vector< double > > _csv_to_double_matrix(std::string fileName)
Parses the content of an csv file into a double matrix.
Definition: AnnParserCSV.cpp:384
void _parse_layer_weights(const AnnStructure &structure, AnnWeights &weights)
Parses the layer weights.
Definition: AnnParserCSV.cpp:309
ACTIVATION_FUNCTION
Enum for representing the available types of scaler parameters.
Definition: AnnProperties.h:43
int _get_layer_index_from_indicator(int indicator)
Extracts layer index from a layer indicator.
Definition: AnnParserCSV.cpp:461
bool _check_if_layer_indicator(int number)
Checks if passed number is a layer indicator.
Definition: AnnParserCSV.cpp:454
This class is a factory class for creating child instances of AnnParser.
Definition: AnnParser.h:228
ACTIVATION_FUNCTION _string_to_activation_function(const std::string &activationFunctionName)
Turns a string containing the name of an activation function in the correct enum representation.
Definition: AnnParser.cpp:41
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.
Definition: AnnParserCSV.cpp:33
tinyxml2::XMLError _parse_vector_int(tinyxml2::XMLElement *parentElement, const std::string vectorName, std::vector< int > &vector)
Parses child elements of an xml element into an vector of int.
Definition: AnnParserXML.cpp:363
std::unique_ptr< ModelParser > create_model_parser(const MODEL_FILE_TYPE fileType) override
Factory function for creating a instance of an ann parser corresponding to the specified file type.
Definition: AnnParser.cpp:25
tinyxml2::XMLError _parse_vector_double(tinyxml2::XMLElement *parentElement, const std::string vectorName, std::vector< double > &vector)
Parses child elements of an xml element into an vector of double.
Definition: AnnParserXML.cpp:384
This class is a abstract parent class for model parser factories implemented in the MeLOn library.
Definition: modelParser.h:112
std::vector< std::vector< std::string > > _csv_to_string_matrix(std::string fileName)
Parses the content of an csv file into a string matrix.
Definition: AnnParserCSV.cpp:419
void _parse_config_file(AnnStructure &structure)
Parses the configuration csv file.
Definition: AnnParserCSV.cpp:59
void _parse_scalers(std::shared_ptr< ScalerData > inputScalerData, std::shared_ptr< ScalerData > outputScalerData, const AnnStructure &structure)
Parses the input and output scalers.
Definition: AnnParserCSV.cpp:131
Definition: tinyxml2.h:1259
void _parse_input_weights(const AnnStructure &structure, AnnWeights &weights)
Parses the input weights.
Definition: AnnParserCSV.cpp:239
const int LAYER_INDICATOR_BASE
Definition: AnnParser.h:80