Class OnnxRuntimeSessionOptions

Class OnnxRuntimeSessionOptions

Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.2.0)

Configuration options for creating ONNX InferenceSession. We recommend keeping the optimized defaults unless you are absolutely certain about the modifications. For technical details, refer to ONNX Runtime documentation.

public static class OnnxRuntimeSessionOptions

Inheritance

objectOnnxRuntimeSessionOptions

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

ExecutionMode

Execution mode for the session. By default, operators are executed concurrently, whenever possible.

public static ExecutionModeOnnx ExecutionMode { get; set; }

Property Value

ExecutionModeOnnx

GraphOptimizationLevel

Graph optimization level for the session. By default, all available optimizations are enabled for maximum performance.

public static GraphOptimizationLevelOnnx GraphOptimizationLevel { get; set; }

Property Value

GraphOptimizationLevelOnnx

InterOpNumThreads

Number of threads for running multiple operations in parallel. If sequential execution (ExecutionModeOnnx.ORT_SEQUENTIAL) is enabled in ExecutionMode property, this value is ignored.

public static int InterOpNumThreads { get; set; }

Property Value

int

IntraOpNumThreads

Number of threads for a single operations.

public static int IntraOpNumThreads { get; set; }

Property Value

int