LearningModelBindingPreview.Clear 方法

定义

已弃用。 清除所有绑定变量。

public:
 virtual void Clear() = Clear;
void Clear();
/// [Windows.Foundation.Metadata.Deprecated("Use ILearningModelBinding instead of ILearningModelBindingPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
void Clear();
public void Clear();
[Windows.Foundation.Metadata.Deprecated("Use ILearningModelBinding instead of ILearningModelBindingPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public void Clear();
function clear()
Public Sub Clear ()
属性

示例

public void PrepareBinding(LearningModelPreview model, VideoFrame picture)
{
	ImageVariableDescriptorPreview inputImageDescription;
	List<ILearningModelVariableDescriptorPreview> inputFeatures = model.Description.InputFeatures.ToList();

    inputImageDescription =
         inputFeatures.FirstOrDefault(feature => feature.ModelFeatureKind == LearningModelFeatureKindPreview.Image)
         as ImageVariableDescriptorPreview;

    // Bind the image
    var binding = new LearningModelBindingPreview(model);
    binding.Bind(inputImageDescription, picture);
}

	//Evaluate and other application logic
	...


	binding.Clear();
}

注解

警告

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

适用于