Condividi tramite


ILearningModelVariableDescriptorPreview.ModelFeatureKind Proprietà

Definizione

Deprecato. Ottiene il tipo dei dati della variabile.

public:
 property LearningModelFeatureKindPreview ModelFeatureKind { LearningModelFeatureKindPreview get(); };
LearningModelFeatureKindPreview ModelFeatureKind();
/// [get: Windows.Foundation.Metadata.Deprecated("Use ILearningModelFeatureDescriptor instead of ILearningModelVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
LearningModelFeatureKindPreview ModelFeatureKind();
public LearningModelFeatureKindPreview ModelFeatureKind { get; }
public LearningModelFeatureKindPreview ModelFeatureKind { [Windows.Foundation.Metadata.Deprecated("Use ILearningModelFeatureDescriptor instead of ILearningModelVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; }
var learningModelFeatureKindPreview = iLearningModelVariableDescriptorPreview.modelFeatureKind;
Public ReadOnly Property ModelFeatureKind As LearningModelFeatureKindPreview

Valore della proprietà

Tipo di dati della variabile.

Attributi

Esempio

public void Evaluator(LearningModelPreview model)
{
	// Retrieve the first input feature which is an image
    ILearningModelVariableDescriptorPreview inputImageFeatureDescription = model.Description.InputFeatures.FirstOrDefault(feature=>feature.ModelFeatureKind == LearningModelFeatureKindPreview.Image);

    ImageVariableDescriptorPreview imageDescriptor = (ImageVariableDescriptorPreview)inputImageFeatureDescription;

	// Ensure the input feature is of type image
    if (imageDescriptor.ModelFeatureKind != LearningModelFeatureKindPreview.Image)
    {
        Console.WriteLine($"Input Feature Name: {imageDescriptor.Name}. Feature type is not an image.");
    }

 }

Commenti

Avviso

Si tratta di un'API deprecata. Usare invece lo spazio dei nomi Windows.AI.MachineLearning .

Si applica a