Share via


LearningModel.LoadFromFilePath Method

Definition

Overloads

LoadFromFilePath(String)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a file on disk.

LoadFromFilePath(String, ILearningModelOperatorProvider)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a file on disk.

LoadFromFilePath(String)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a file on disk.

public:
 static LearningModel ^ LoadFromFilePath(Platform::String ^ filePath);
/// [Windows.Foundation.Metadata.Overload("LoadFromFilePath")]
 static LearningModel LoadFromFilePath(winrt::hstring const& filePath);
[Windows.Foundation.Metadata.Overload("LoadFromFilePath")]
public static LearningModel LoadFromFilePath(string filePath);
function loadFromFilePath(filePath)
Public Shared Function LoadFromFilePath (filePath As String) As LearningModel

Parameters

filePath
String

Platform::String

winrt::hstring

The path to the ONNX model file on disk.

Returns

An object representing the model.

Attributes

Remarks

This method is meant for desktop (non-UWP) applications. For UWP, see LoadFromStorageFileAsync.

Windows Server

To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.

Thread safety

This API is thread-safe.

Applies to

LoadFromFilePath(String, ILearningModelOperatorProvider)

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Loads an ONNX model from a file on disk.

public:
 static LearningModel ^ LoadFromFilePath(Platform::String ^ filePath, ILearningModelOperatorProvider ^ operatorProvider);
/// [Windows.Foundation.Metadata.Overload("LoadFromFilePathWithOperatorProvider")]
 static LearningModel LoadFromFilePath(winrt::hstring const& filePath, ILearningModelOperatorProvider const& operatorProvider);
[Windows.Foundation.Metadata.Overload("LoadFromFilePathWithOperatorProvider")]
public static LearningModel LoadFromFilePath(string filePath, ILearningModelOperatorProvider operatorProvider);
function loadFromFilePath(filePath, operatorProvider)
Public Shared Function LoadFromFilePath (filePath As String, operatorProvider As ILearningModelOperatorProvider) As LearningModel

Parameters

filePath
String

Platform::String

winrt::hstring

The path to the ONNX model file on disk.

Returns

An object representing the model.

Attributes

Remarks

This method is meant for desktop (non-UWP) applications. For UWP, see LoadFromStorageFileAsync.

Windows Server

To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.

Thread safety

This API is thread-safe.

Applies to