LearningModelBindingPreview.Bind Method

Definition

Overloads

Bind(String, Object)

Deprecated. Binds a single input or output feature to a defined variable.

Bind(String, Object, IPropertySet)

Deprecated. Binds a single input or output feature to a defined variable, with specified metadata.

Bind(String, Object)

Deprecated. Binds a single input or output feature to a defined variable.

public:
 virtual void Bind(Platform::String ^ name, Platform::Object ^ value) = Bind;
/// [Windows.Foundation.Metadata.Overload("Bind")]
void Bind(winrt::hstring const& name, IInspectable const& value);
/// [Windows.Foundation.Metadata.Overload("Bind")]
/// [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 Bind(winrt::hstring const& name, IInspectable const& value);
[Windows.Foundation.Metadata.Overload("Bind")]
public void Bind(string name, object value);
[Windows.Foundation.Metadata.Overload("Bind")]
[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 Bind(string name, object value);
function bind(name, value)
Public Sub Bind (name As String, value As Object)

Parameters

name
String

Platform::String

winrt::hstring

The name of the input/output feature.

value
Object

Platform::Object

IInspectable

The value of the input/output feature.

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

Remarks

Note: Currently, outputs of type double are not supported. If possible, consider using type float instead.

Warning

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

Applies to

Bind(String, Object, IPropertySet)

Deprecated. Binds a single input or output feature to a defined variable, with specified metadata.

public:
 virtual void Bind(Platform::String ^ name, Platform::Object ^ value, IPropertySet ^ metadata) = Bind;
/// [Windows.Foundation.Metadata.Overload("BindWithProperties")]
void Bind(winrt::hstring const& name, IInspectable const& value, IPropertySet const& metadata);
/// [Windows.Foundation.Metadata.Overload("BindWithProperties")]
/// [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 Bind(winrt::hstring const& name, IInspectable const& value, IPropertySet const& metadata);
[Windows.Foundation.Metadata.Overload("BindWithProperties")]
public void Bind(string name, object value, IPropertySet metadata);
[Windows.Foundation.Metadata.Overload("BindWithProperties")]
[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 Bind(string name, object value, IPropertySet metadata);
function bind(name, value, metadata)
Public Sub Bind (name As String, value As Object, metadata As IPropertySet)

Parameters

name
String

Platform::String

winrt::hstring

The name of the input/output feature.

value
Object

Platform::Object

IInspectable

The value of the input/output feature.

metadata
IPropertySet

The specified metadata for the input/output feature.

Attributes

Remarks

Note: Currently, outputs of type double are not supported. If possible, consider using type float instead.

Warning

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

Applies to