-api-id | -api-type |
---|---|
T:Windows.AI.MachineLearning.Preview.LearningModelBindingPreview |
winrt class |
Deprecated. Represents the associations between model inputs and variable instances.
Warning
This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.
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);
}