OrtSessionWrapper class

Properties

hashCode int
The hash code for this object.
no setterinherited
inputCount int
no setter
inputNames List<String>
no setter
isDisposed bool
no setter
outputCount int
no setter
outputNames List<String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(Map<String, OrtValueWrapper> inputs) List<OrtValueWrapper>
runFloat(Map<String, OrtValueWrapper> inputs, List<int> outputElementCounts) List<Float32List>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create(String modelPath, {OnnxRuntime? runtime, Map<OrtProvider, Map<String, String>> providerOptions = const {}, SessionConfig sessionConfig = const SessionConfig()}) OrtSessionWrapper
Creates a session with automatic provider selection based on the current platform. Providers are chosen via OrtProviders.getDefaultProvidersForPlatform.
createWithCustomConfig(String modelPath, {OnnxRuntime? runtime, required void configure(OrtProviders providers, Pointer<OrtSessionOptions> options)}) OrtSessionWrapper
Creates a session with a custom configuration callback for full control over session options and providers.
createWithProviders(String modelPath, {required List<OrtProvider> providers, OnnxRuntime? runtime, Map<OrtProvider, Map<String, String>> providerOptions = const {}, SessionConfig sessionConfig = const SessionConfig()}) OrtSessionWrapper
Creates a session with manual provider selection.