Share via


LearningModelBindingPreview Classe

Definizione

Deprecato. Rappresenta le associazioni tra gli input del modello e le istanze delle variabili.

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)
Ereditarietà
Object Platform::Object IInspectable LearningModelBindingPreview
Attributi
Implementazioni
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>

Requisiti Windows

Famiglia di dispositivi
Windows 10, version 1803 (è stato introdotto in 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (è stato introdotto in v1.0)

Esempio

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

Commenti

Avviso

Si tratta di un'API deprecata. Usare invece lo spazio dei nomi Windows.AI.MachineLearning .

Costruttori

LearningModelBindingPreview(LearningModelPreview)

Deprecato. Crea un learningModelBinding dall'oggetto LearningModelSession specificato.

Proprietà

Size

Deprecato. Ottiene il numero di elementi nella mappa.

Metodi

Bind(String, Object)

Deprecato. Associa una singola funzionalità di input o output a una variabile definita.

Bind(String, Object, IPropertySet)

Deprecato. Associa una singola funzionalità di input o output a una variabile definita, con metadati specificati.

Clear()

Deprecato. Cancella tutte le variabili associate.

First()

Deprecato. Restituisce un iteratore che viene inizializzato al primo elemento nella visualizzazione della mappa.

HasKey(String)

Deprecato. Determina se la visualizzazione mappa contiene la chiave specificata.

Lookup(String)

Deprecato. Restituisce l'elemento nella chiave specificata nella visualizzazione mappa.

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

Deprecato. Suddivide la visualizzazione mappa in due visualizzazioni.

Si applica a