LearningModel.LoadFromStreamAsync 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| LoadFromStreamAsync(IRandomAccessStreamReference) | 以异步方式从流加载 ONNX 模型。 | 
| LoadFromStreamAsync(IRandomAccessStreamReference, ILearningModelOperatorProvider) | 以异步方式从流加载 ONNX 模型。 | 
LoadFromStreamAsync(IRandomAccessStreamReference)
以异步方式从流加载 ONNX 模型。
public:
 static IAsyncOperation<LearningModel ^> ^ LoadFromStreamAsync(IRandomAccessStreamReference ^ modelStream);/// [Windows.Foundation.Metadata.Overload("LoadFromStreamAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference const& modelStream);[Windows.Foundation.Metadata.Overload("LoadFromStreamAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference modelStream);function loadFromStreamAsync(modelStream)Public Shared Function LoadFromStreamAsync (modelStream As IRandomAccessStreamReference) As IAsyncOperation(Of LearningModel)参数
- modelStream
- IRandomAccessStreamReference
要从中加载模型的流。
返回
表示模型的 对象。
- 属性
注解
Windows Server
若要在 Windows Server 上使用此 API,必须使用带桌面体验的 Windows Server 2019。
线程安全
此 API 是线程安全的。
适用于
LoadFromStreamAsync(IRandomAccessStreamReference, ILearningModelOperatorProvider)
以异步方式从流加载 ONNX 模型。
public:
 static IAsyncOperation<LearningModel ^> ^ LoadFromStreamAsync(IRandomAccessStreamReference ^ modelStream, ILearningModelOperatorProvider ^ operatorProvider);/// [Windows.Foundation.Metadata.Overload("LoadFromStreamWithOperatorProviderAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference const& modelStream, ILearningModelOperatorProvider const& operatorProvider);[Windows.Foundation.Metadata.Overload("LoadFromStreamWithOperatorProviderAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<LearningModel> LoadFromStreamAsync(IRandomAccessStreamReference modelStream, ILearningModelOperatorProvider operatorProvider);function loadFromStreamAsync(modelStream, operatorProvider)Public Shared Function LoadFromStreamAsync (modelStream As IRandomAccessStreamReference, operatorProvider As ILearningModelOperatorProvider) As IAsyncOperation(Of LearningModel)参数
- modelStream
- IRandomAccessStreamReference
要从中加载模型的流。
- operatorProvider
- ILearningModelOperatorProvider
返回
表示模型的 对象。
- 属性
注解
Windows Server
若要在 Windows Server 上使用此 API,必须使用带桌面体验的 Windows Server 2019。
线程安全
此 API 是线程安全的。