Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5    Statistic    FMM    Blog  

WindowsML.Open

Loads a model for Windows Machine Learning.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WindowsML 10.5 No Yes Yes, Windows only No No
MBS( "WindowsML.Open"; Path )   More

Parameters

Parameter Description Example
Path The native file path to the model file. "C:\Users\Christian\Desktop\SqueezeNet.onnx"

Result

Returns reference number or error.

Description

Loads a model for Windows Machine Learning.
Please use an onnx file as you find them on various websites, e.g. start here:
https://docs.microsoft.com/en-us/windows/ai/windows-ml/get-onnx-model

Will return an error about unregistered class if called on older Windows versions before 10.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

Examples

Load a model

Set Variable [ $model ; Value: MBS("WindowsML.Open"; "C:\Users\Christian\Desktop\SqueezeNet.onnx") ]

Example result: 73001

Load a model and show description:

# Load Model in file WindowsML
Go to Layout [ “WindowsML” (WindowsML) ; Animation: None ]
#
Set Variable [ $WinMLRef ; Value: MBS( "WindowsML.Open"; WindowsML::Model File Path ) ]
If [ MBS("ISError") ]
    Show Custom Dialog [ "Failed to load model" ; $WinMLRef ]
Else
    Set Variable [ $$WinMLRef ; Value: $WinMLRef ]
    Set Field [ WindowsML::Model Description ; MBS("JSON.Colorize"; MBS( "WindowsML.Description"; $$WinMLRef )) ]
End If

See also

Blog Entries

Created 26th September 2020, last changed 27th September 2020


WindowsML.Evaluate   -   WindowsML.Release

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins