ImageVariableDescriptorPreview.ModelFeatureKind ImageVariableDescriptorPreview.ModelFeatureKind ImageVariableDescriptorPreview.ModelFeatureKind ImageVariableDescriptorPreview.ModelFeatureKind ImageVariableDescriptorPreview.ModelFeatureKind Property

Definition

Deprecated. Gets the data type of the variable.

public : LearningModelFeatureKindPreview ModelFeatureKind { get; }
LearningModelFeatureKindPreview ModelFeatureKind();
public LearningModelFeatureKindPreview ModelFeatureKind { get; }
Public ReadOnly Property ModelFeatureKind As LearningModelFeatureKindPreview
var learningModelFeatureKindPreview = imageVariableDescriptorPreview.modelFeatureKind;

Property Value

Examples

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.");
    }

 }

Remarks

Warning

This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.