|
25.02
|
#include <ModelAccuracyChecker.hpp>
Public Member Functions | |
| ModelAccuracyChecker (const std::map< std::string, std::string > &validationLabelSet, const std::vector< LabelCategoryNames > &modelOutputLabels) | |
| Constructor for a model top k accuracy checker. More... | |
| float | GetAccuracy (unsigned int k) |
| Get Top K accuracy. More... | |
| template<typename TContainer > | |
| void | AddImageResult (const std::string &imageName, std::vector< TContainer > outputTensor) |
| Record the prediction result of an image. More... | |
Definition at line 45 of file ModelAccuracyChecker.hpp.
| ModelAccuracyChecker | ( | const std::map< std::string, std::string > & | validationLabelSet, |
| const std::vector< LabelCategoryNames > & | modelOutputLabels | ||
| ) |
Constructor for a model top k accuracy checker.
| [in] | validationLabelSet | Mapping from names of images to be validated, to category names of their corresponding ground-truth labels. |
| [in] | modelOutputLabels | Mapping from output nodes to the category names of their corresponding labels Note that an output node can have multiple category names. |
Definition at line 17 of file ModelAccuracyChecker.cpp.
|
inline |
Record the prediction result of an image.
| [in] | imageName | Name of the image. |
| [in] | outputTensor | Output tensor of the network running imageName. |
Definition at line 73 of file ModelAccuracyChecker.hpp.
| float GetAccuracy | ( | unsigned int | k | ) |
Get Top K accuracy.
| [in] | k | The number of top predictions to use for validating the ground-truth label. For example, if k is 3, then a prediction is considered correct as long as the ground-truth appears in the top 3 predictions. |
k th predictions. Definition at line 23 of file ModelAccuracyChecker.cpp.
References ARMNN_LOG, and armnn::warning.