memory_advice::DefaultPredictor

Summary

Inheritance

Inherits from: memory_advice::IPredictor

Constructors and Destructors

~DefaultPredictor()

Public functions

Init(std::string model_file, std::string features_file) override
Initializes the predictor with the given model.
Predict(Json::object data) override
virtual float
Runs the tensorflow model with the provided data.

Public functions

Init

virtual MemoryAdvice_ErrorCode Init(
  std::string model_file,
  std::string features_file
) override

Initializes the predictor with the given model.

Details
Parameters
model_file
the location of the asset containing a predictor model file
features_file
the location of the asset containing the feature list matching the model
Returns
MEMORYADVICE_ERROR_TFLITE_MODEL_INVALID if the provided model was invalid, or MEMORYADVICE_ERROR_OK if there are no errors.

Predict

virtual float Predict(
  Json::object data
) override

Runs the tensorflow model with the provided data.

Details
Parameters
data
the memory data from the device.
Returns
the result from the model.

~DefaultPredictor

 ~DefaultPredictor() override