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