-api-id | -api-type | ms.custom |
---|---|---|
T:Windows.AI.MachineLearning.LearningModelSessionOptions |
winrt class |
19H1 |
Describes inference options that are used during the creation of LearningModelSession objects.
The LearningModelSessionOptions object can be used to configure LearningModelSession construction.
Windows version | SDK version | Value added |
---|---|---|
2004 | 19041 | CloseModelOnSessionCreation |
The following example creates a LearningModelSessionOptions object for use during session creation.
private LearningModelSessionOptions CreateSessionOptions()
{
var options = new LearningModelSessionOptions();
// Disable constant batch size optimizations
options.BatchSizeOverride = 0;
return options;
}