Compartilhar via


LearningModelBindingPreview Classe

Definição

Preterido. Representa as associações entre entradas de modelo e instâncias variáveis.

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)
Herança
Object Platform::Object IInspectable LearningModelBindingPreview
Atributos
Implementações
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>

Requisitos do Windows

Família de dispositivos
Windows 10, version 1803 (introduzida na 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduzida na v1.0)

Exemplos

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

Comentários

Aviso

Essa é uma API preterida. Use o namespace Windows.AI.MachineLearning .

Construtores

LearningModelBindingPreview(LearningModelPreview)

Preterido. Cria um LearningModelBinding do LearningModelSession especificado.

Propriedades

Size

Preterido. Obtém o número de elementos no mapa.

Métodos

Bind(String, Object)

Preterido. Associa um único recurso de entrada ou saída a uma variável definida.

Bind(String, Object, IPropertySet)

Preterido. Associa um único recurso de entrada ou saída a uma variável definida, com metadados especificados.

Clear()

Preterido. Limpa todas as variáveis associadas.

First()

Preterido. Retorna um iterador que é inicializado para o primeiro elemento na exibição do mapa.

HasKey(String)

Preterido. Determina se a exibição do mapa contém a chave especificada.

Lookup(String)

Preterido. Retorna o item na chave especificada no modo de exibição de mapa.

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

Preterido. Divide a exibição do mapa em dois modos de exibição.

Aplica-se a