LearningModelDescriptionPreview.OutputFeatures 属性

定义

已弃用。 获取模型的输出说明。

public:
 property IIterable<ILearningModelVariableDescriptorPreview ^> ^ OutputFeatures { IIterable<ILearningModelVariableDescriptorPreview ^> ^ get(); };
IIterable<ILearningModelVariableDescriptorPreview> OutputFeatures();
/// [get: Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelDescriptionPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
IIterable<ILearningModelVariableDescriptorPreview> OutputFeatures();
public IEnumerable<ILearningModelVariableDescriptorPreview> OutputFeatures { get; }
public IEnumerable<ILearningModelVariableDescriptorPreview> OutputFeatures { [Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelDescriptionPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; }
var iIterable = learningModelDescriptionPreview.outputFeatures;
Public ReadOnly Property OutputFeatures As IEnumerable(Of ILearningModelVariableDescriptorPreview)

属性值

模型的输出说明,由输出名称键。

属性

示例

public void Evaluator()
{
    var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
    LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);

	// Retrieve the model output variable description (as a tensor)
    ILearningModelVariableDescriptorPreview outputTensorDescription = outputFeatures.FirstOrDefault(feature => feature.ModelFeatureKind == LearningModelFeatureKindPreview.Tensor) as TensorVariableDescriptorPreview;

 }

注解

警告

这是一个已弃用的 API。 请改用 Windows.AI.MachineLearning 命名空间。

适用于