共用方式為


LearningModelBindingPreview 類別

定義

已取代。 表示模型輸入與變數實例之間的關聯。

public ref class LearningModelBindingPreview sealed : IIterable<IKeyValuePair<Platform::String ^, Platform::Object ^> ^>, IMapView<Platform::String ^, Platform::Object ^>
/// [Windows.Foundation.Metadata.Activatable(Windows.AI.MachineLearning.Preview.ILearningModelBindingPreviewFactory, 65536, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class LearningModelBindingPreview final : IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>>, IMapView<winrt::hstring, IInspectable const&>
/// [Windows.Foundation.Metadata.Activatable(Windows.AI.MachineLearning.Preview.ILearningModelBindingPreviewFactory, 65536, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModelBinding instead of LearningModelBindingPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class LearningModelBindingPreview final : IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>>, IMapView<winrt::hstring, IInspectable const&>
[Windows.Foundation.Metadata.Activatable(typeof(Windows.AI.MachineLearning.Preview.ILearningModelBindingPreviewFactory), 65536, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class LearningModelBindingPreview : IEnumerable<KeyValuePair<string,object>>, IReadOnlyDictionary<string,object>
[Windows.Foundation.Metadata.Activatable(typeof(Windows.AI.MachineLearning.Preview.ILearningModelBindingPreviewFactory), 65536, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModelBinding instead of LearningModelBindingPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class LearningModelBindingPreview : IEnumerable<KeyValuePair<string,object>>, IReadOnlyDictionary<string,object>
function LearningModelBindingPreview(model)
Public NotInheritable Class LearningModelBindingPreview
Implements IEnumerable(Of KeyValuePair(Of String, Object)), IReadOnlyDictionary(Of String, Object)
繼承
Object Platform::Object IInspectable LearningModelBindingPreview
屬性
實作
IIterable<IKeyValuePair<K,V>> IEnumerable<KeyValuePair<K,V>> IIterable<IKeyValuePair<String,Object>> IEnumerable<KeyValuePair<String,Object>> IIterable<IKeyValuePair<Platform::String,Platform::Object>> IIterable<IKeyValuePair<winrt::hstring,IInspectable>> IMapView<String,Object> IReadOnlyDictionary<String,Object> IMapView<Platform::String,Platform::Object> IMapView<winrt::hstring,IInspectable>

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (已於 v1.0 引進)

範例

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

備註

警告

這是已被取代的 API。 請改用 Windows.AI.MachineLearning 命名空間。

建構函式

LearningModelBindingPreview(LearningModelPreview)

已取代。 從指定的LearningModelSession建立LearningModelBinding

屬性

Size

已取代。 取得對應中的專案數目。

方法

Bind(String, Object)

已取代。 將單一輸入或輸出功能系結至定義的變數。

Bind(String, Object, IPropertySet)

已取代。 使用指定的中繼資料,將單一輸入或輸出功能系結至已定義的變數。

Clear()

已取代。 清除所有系結變數。

First()

已取代。 傳回迭代器,初始化為對應檢視中的第一個元素。

HasKey(String)

已取代。 判斷地圖檢視是否包含指定的索引鍵。

Lookup(String)

已取代。 傳回地圖檢視中位於指定索引鍵的專案。

Split(IMapView<String,Object>, IMapView<String,Object>)

已取代。 將地圖檢視分割成兩個檢視。

適用於