-api-id | -api-type |
---|---|
P:Windows.AI.MachineLearning.Preview.TensorVariableDescriptorPreview.ModelFeatureKind |
winrt property |
Deprecated. Gets the data type of the variable.
The data type of the variable.
Warning
This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.
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.");
}
}