Share via


LearningModelSessionOptions.CloseModelOnSessionCreation Property

Definition

Important

For the latest documentation about Windows Machine Learning, see What is Windows ML. That documentation describes APIs that are in the Microsoft.Windows.AI.MachineLearning namespace, which ships in the Windows App SDK. Those APIs supersede the ones documented here, which are in the Windows.AI.MachineLearning namespace, and were shipped in 2018.

Specifies whether a LearningModelSession should close the associated learning model when it is created.

public:
 property bool CloseModelOnSessionCreation { bool get(); void set(bool value); };
bool CloseModelOnSessionCreation();

void CloseModelOnSessionCreation(bool value);
public bool CloseModelOnSessionCreation { get; set; }
var boolean = learningModelSessionOptions.closeModelOnSessionCreation;
learningModelSessionOptions.closeModelOnSessionCreation = boolean;
Public Property CloseModelOnSessionCreation As Boolean

Property Value

Boolean

bool

Indicates whether the model should be closed upon session creation.

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.AI.MachineLearning.MachineLearningContract (introduced in v3.0)

Applies to

See also