LearningModelFeatureKindPreview 枚举

定义

已弃用。 定义模型特征的数据类型列表

public enum class LearningModelFeatureKindPreview
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
enum class LearningModelFeatureKindPreview
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModelFeatureKind instead of LearningModelFeatureKindPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
enum class LearningModelFeatureKindPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public enum LearningModelFeatureKindPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModelFeatureKind instead of LearningModelFeatureKindPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public enum LearningModelFeatureKindPreview
var value = Windows.AI.MachineLearning.Preview.LearningModelFeatureKindPreview.undefined
Public Enum LearningModelFeatureKindPreview
继承
LearningModelFeatureKindPreview
属性

Windows 要求

设备系列
Windows 10, version 1803 (在 10.0.17134.0 中引入)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (在 v1.0 中引入)

字段

Image 4

特征类型为 Image。

Map 3

特征类型为 Map。

Sequence 2

特征类型为序列。

Tensor 1

特征类型为 Tensor。

Undefined 0

特征类型为“未定义”。

示例

public void Evaluator(LearningModelPreview model)
{
	// Retrieve the first input feature which is an image
    ILearningModelVariableDescriptorPreview inputImageFeatureDescription = model.Description.InputFeatures.FirstOrDefault(feature=>feature.ModelFeatureKind == LearningModelFeatureKindPreview.Image);

    ImageVariableDescriptorPreview imageDescriptor = (ImageVariableDescriptorPreview)inputImageFeatureDescription;

	...

 }

注解

警告

这是一个已弃用的 API。 请改用 Windows.AI.MachineLearning 命名空间。

适用于