MapVariableDescriptorPreview 類別

定義

已取代。 表示對應變數描述元資訊。

public ref class MapVariableDescriptorPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class MapVariableDescriptorPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use MapFeatureDescriptor instead of MapVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class MapVariableDescriptorPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class MapVariableDescriptorPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use MapFeatureDescriptor instead of MapVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class MapVariableDescriptorPreview
Public NotInheritable Class MapVariableDescriptorPreview
繼承
Object Platform::Object IInspectable MapVariableDescriptorPreview
屬性
實作

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (已於 v1.0 引進)

範例

public void Evaluator(LearningModelPreview model)
{
	// Retrieve the first input feature which is a map
    ILearningModelVariableDescriptorPreview inputMapFeatureDescription = model.Description.InputFeatures.First(feature=>feature.ModelFeatureKind == LearningModelFeatureKindPreview.Map);

    MapVariableDescriptorPreview MapDescriptor = (MapVariableDescriptorPreview)inputMapFeatureDescription;

	// Ensure the input feature is of type map
    if (MapDescriptor.ModelFeatureKind != LearningModelFeatureKindPreview.Map)
    {
        Console.WriteLine($"Input Feature Name: {imageDescriptor.Name}. Not a map feature type.");
    }

 }

備註

警告

這是已被取代的 API。 請改用 Windows.AI.MachineLearning 命名空間。

屬性

Description

已取代。 取得描述對應變數。

Fields

已取代。 取得地圖變數欄位的資料類型。

IsRequired

已取代。 如果為 true,您必須先將值系結至這項功能,才能評估 LearningModelSession

KeyKind

已取代。 取得對應變數索引鍵的資料類型。

ModelFeatureKind

已取代。 取得變數的資料類型。

Name

已取代。 取得對應變數的名稱。

ValidIntegerKeys

已取代。 取得對應變數描述元的有效整數索引鍵。

ValidStringKeys

已取代。 取得對應變數描述元的有效字串索引鍵。

適用於