LearningModelBindingPreview.Clear Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deprecated. Clears all bound variables.
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 ()
- Attributes
Examples
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();
}
Remarks
Warning
This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.