IsolateInterpreter class

Web implementation of IsolateInterpreter.

On web, isolates are not available. This wraps the regular Interpreter and runs inference on the main thread.

Properties

address int
The interpreter address (always 0 on web).
final
debugName String
Debug label for this interpreter.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state IsolateInterpreterState
The current interpreter state.
no setter
stateChanges Stream<IsolateInterpreterState>
Stream of interpreter state changes.
no setter

Methods

close() Future<void>
Close resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(Object input, Object output) Future<void>
Run LiteRT model for single input and output.
runForMultipleInputs(List<Object> inputs, Map<int, Object> outputs) Future<void>
Run LiteRT model for multiple inputs and outputs.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

create({required int address, String debugName = 'TfLiteInterpreterIsolate'}) Future<IsolateInterpreter>
Address-based factory, not supported on web.
createFromInterpreter(Interpreter interpreter, {String debugName = 'TfLiteInterpreterWeb'}) Future<IsolateInterpreter>
Creates a web IsolateInterpreter from an existing Interpreter.