ImageVariableDescriptorPreview.ModelFeatureKind Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deprecated. Gets the data type of the variable.
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 = imageVariableDescriptorPreview.modelFeatureKind;
Public ReadOnly Property ModelFeatureKind As LearningModelFeatureKindPreview
Property Value
The data type of the variable.
Implements
- Attributes
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.