Program Listing for File accuracy.h

Return to documentation for file (include/accuracy.h)

#ifndef MINDSPORE_INCLUDE_API_METRICS_ACCURACY_H
#define MINDSPORE_INCLUDE_API_METRICS_ACCURACY_H
#include <vector>
#include "include/api/metrics/metrics.h"

namespace mindspore {

constexpr int METRICS_CLASSIFICATION = 0;
constexpr int METRICS_MULTILABEL = 1;

class AccuracyMetrics : public Metrics {
 public:
  explicit AccuracyMetrics(int accuracy_metrics = METRICS_CLASSIFICATION, const std::vector<int> &input_indexes = {1},
                           const std::vector<int> &output_indexes = {0});
  virtual ~AccuracyMetrics();
  void Clear() override;
  float Eval() override;
};

}  // namespace mindspore
#endif  // MINDSPORE_INCLUDE_API_METRICS_ACCURACY_H