LearningModel.LoadFromFilePath 方法

定義

多載

LoadFromFilePath(String)

從磁片上的檔案載入 ONNX 模型。

LoadFromFilePath(String, ILearningModelOperatorProvider)

從磁片上的檔案載入 ONNX 模型。

LoadFromFilePath(String)

從磁片上的檔案載入 ONNX 模型。

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

參數

filePath
String

Platform::String

winrt::hstring

磁片上 ONNX 模型檔案的路徑。

傳回

表示模型的 物件。

屬性

備註

此方法適用于傳統型 (非 UWP) 應用程式。 針對 UWP,請參閱 LoadFromStorageFileAsync

Windows Server

若要在 Windows Server 上使用此 API,您必須搭配桌面體驗使用 Windows Server 2019。

執行緒安全

此 API 是安全線程。

適用於

LoadFromFilePath(String, ILearningModelOperatorProvider)

從磁片上的檔案載入 ONNX 模型。

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

參數

filePath
String

Platform::String

winrt::hstring

磁片上 ONNX 模型檔案的路徑。

傳回

表示模型的 物件。

屬性

備註

此方法適用于傳統型 (非 UWP) 應用程式。 針對 UWP,請參閱 LoadFromStorageFileAsync

Windows Server

若要在 Windows Server 上使用此 API,您必須搭配桌面體驗使用 Windows Server 2019。

執行緒安全

此 API 是安全線程。

適用於