Share via


LearningModelDescriptionPreview Class

Definition

Deprecated. Represents the metadata and property descriptions for the provided model.

public ref class LearningModelDescriptionPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class LearningModelDescriptionPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelDescriptionPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class LearningModelDescriptionPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class LearningModelDescriptionPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelDescriptionPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class LearningModelDescriptionPreview
Public NotInheritable Class LearningModelDescriptionPreview
Inheritance
Object Platform::Object IInspectable LearningModelDescriptionPreview
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v1.0)

Examples

public void Evaluator()
{
    var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
    LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);

    // Our evaluator only handles version 1 of the model
    if (model.Description.Version != 1)
    {
        throw new Exception("Invalid model version");
    }
}

Remarks

Warning

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

Properties

Author

Deprecated. Gets the author information from the model.

Description

Deprecated. Gets the custom description of the model.

Domain

Deprecated. Gets the domain information for the model.

InputFeatures

Deprecated. Gets the input descriptions for the model.

Metadata

Deprecated. Gets the metadata from the model.

Name

Deprecated. Gets the name of the model.

OutputFeatures

Deprecated. Gets the output descriptions of the model.

Version

Deprecated. Gets the version information of the model.

Applies to