Program Listing for File metrics.h

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

#ifndef MINDSPORE_INCLUDE_API_METRICS_METRICS_H
#define MINDSPORE_INCLUDE_API_METRICS_METRICS_H
#include <vector>
#include "include/api/model.h"

namespace mindspore {

class MetricsImpl;
class ModelImpl;
class MSTensor;

class Metrics {
 public:
  virtual ~Metrics() = default;
  virtual void Clear() {}
  virtual float Eval() { return 0.0; }
  virtual void Update(std::vector<MSTensor *> inputs, std::vector<MSTensor *> outputs) {}
 protected:
  friend class Model;
  friend class ModelImpl;
  MetricsImpl* metrics_impl_;
};

}  // namespace mindspore
#endif  // MINDSPORE_INCLUDE_API_METRICS_METRICS_H