Stay organized with collections
Save and categorize content based on your preferences.
memory_advice::DefaultPredictor
Summary
Inheritance
Inherits from:
memory_advice::IPredictor
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
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-11-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-27 UTC."],[],[],null,["# memory_advice::DefaultPredictor Class Reference\n\nmemory_advice::DefaultPredictor\n===============================\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: [memory_advice::IPredictor](/reference/games/memory-advice/classmemory/advice-1-1-i-predictor)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [~DefaultPredictor](#classmemory__advice_1_1_default_predictor_1abd4be0f31aed4ab428cb8e362ccfabcb)`()` ||\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Init](#classmemory__advice_1_1_default_predictor_1a517c290713404d22f8c5ba1ad918de42)`(std::string model_file, std::string features_file) override` | `virtual `[MemoryAdvice_ErrorCode](/reference/games/memory-advice/group/memory-advice#group__memory__advice_1ga7061497339a50e977d400a58b8fb9f82) Initializes the predictor with the given model. |\n| [Predict](#classmemory__advice_1_1_default_predictor_1a333579d29d7ed55551c1e59aad451350)`(Json::object data) override` | `virtual float` Runs the tensorflow model with the provided data. |\n\nPublic functions\n----------------\n\n### Init\n\n```scdoc\nvirtual MemoryAdvice_ErrorCode Init(\n std::string model_file,\n std::string features_file\n) override\n``` \nInitializes the predictor with the given model.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 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 | |\n| **Returns** | MEMORYADVICE_ERROR_TFLITE_MODEL_INVALID if the provided model was invalid, or MEMORYADVICE_ERROR_OK if there are no errors. |\n\n### Predict\n\n```text\nvirtual float Predict(\n Json::object data\n) override\n``` \nRuns the tensorflow model with the provided data.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|---------------------------------------------------------------------------------------------|\n| Parameters | |--------|----------------------------------| | `data` | the memory data from the device. | |\n| **Returns** | the result from the model. |\n\n### \\~DefaultPredictor\n\n```text\n ~DefaultPredictor() override\n```"]]