TensorVariableDescriptorPreview.ModelFeatureKind TensorVariableDescriptorPreview.ModelFeatureKind TensorVariableDescriptorPreview.ModelFeatureKind TensorVariableDescriptorPreview.ModelFeatureKind TensorVariableDescriptorPreview.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 = tensorVariableDescriptorPreview.modelFeatureKind;

Property Value

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

 }

Remarks

Warning

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