Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.34 KB

tensorvariabledescriptorpreview_modelfeaturekind.md

File metadata and controls

42 lines (30 loc) · 1.34 KB
-api-id -api-type
P:Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview.ModelFeatureKind
winrt property

Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview.ModelFeatureKind

-description

Deprecated. Gets the data type of the variable.

-property-value

The data type of the variable.

-remarks

Warning

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

-see-also

-examples

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

   TensorVariableDescriptorPreview TensorDescriptor = (TensorVariableDescriptorPreview)inputTensorFeatureDescription;

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

}