Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WindowsML.Open

Loads a model for Windows Machine Learning.

Component Version macOS Windows Linux Server iOS SDK
WindowsML 10.5 ❌ No ✅ Yes ❌ No ✅ Yes, on Windows ❌ 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

Example Databases

Blog Entries

This function checks for a license.

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


WindowsML.List - WindowsML.Release