Last active
September 21, 2021 23:49
-
-
Save olokobayusuf/a66e4daae19a234823f8a4e97f08a87f to your computer and use it in GitHub Desktop.
The core API in NatML.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the ML model data | |
var modelData = MLModelData.FromFile("/path/to/model.onnx"); | |
// Deserialize the model | |
var model = modelData.Deserialize(); | |
// Print a model metadata value | |
Debug.Log("The model was created by: " + model["Author"]); | |
// Check the expected input size | |
var inputType = model.inputs[0] as MLImageType; | |
Debug.Log($"Model expects image with size: {inputType.width}x{inputType.height}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment