LearningModelDescriptionPreview.OutputFeatures 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
已取代。 取得模型的輸出描述。
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 命名空間。