Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.2 KB

learningmodelbindingpreview.md

File metadata and controls

38 lines (28 loc) · 1.2 KB
-api-id -api-type
T:Windows.AI.MachineLearning.Preview.LearningModelBindingPreview
winrt class

Windows.AI.MachineLearning.Preview.LearningModelBindingPreview

-description

Deprecated. Represents the associations between model inputs and variable instances.

-remarks

Warning

This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.

-see-also

-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);
}