TensorVariableDescriptorPreview.ModelFeatureKind Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Deprecato. Ottiene il tipo dei dati della variabile.
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 = tensorVariableDescriptorPreview.modelFeatureKind;
Public ReadOnly Property ModelFeatureKind As LearningModelFeatureKindPreview
Valore della proprietà
Tipo di dati della variabile.
Implementazioni
- Attributi
Esempio
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.");
}
}
Commenti
Avviso
Si tratta di un'API deprecata. Usare invece lo spazio dei nomi Windows.AI.MachineLearning .