Поделиться через


TensorVariableDescriptorPreview.Name Свойство

Определение

Не рекомендуется. Возвращает имя тензора.

public:
 property Platform::String ^ Name { Platform::String ^ get(); };
winrt::hstring Name();
/// [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")]
winrt::hstring Name();
public string Name { get; }
public string Name { [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 string = tensorVariableDescriptorPreview.name;
Public ReadOnly Property Name As String

Значение свойства

String

Platform::String

winrt::hstring

Имя тензора. Он должен быть уникальным для всех переменных в модели.

Реализации

Атрибуты

Примеры

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;

	// Output the description of the Tensor variable
    Console.WriteLine($"Input Feature Name: {TensorDescriptor.Name}. Description: {TensorDescriptor.Description}.");
 }

Комментарии

Предупреждение

Это нерекомендуемый API. Вместо этого используйте пространство имен Windows.AI.MachineLearning .

Применяется к