We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since the screen drawing becomes unstable during loading, I am thinking of loading the model using Isolate.
I got an error with the code below. thanks.
[ERROR:flutter/runtime/dart_isolate.cc(1107)] Unhandled exception: Invalid argument: <- _interpreter in Instance of 'Interpreter' (from package:tflite_flutter/src/interpreter.dart)
Future<dynamic> spawnAndReceive(File filename) async { final resultPort = ReceivePort(); await Isolate.spawn(_readTensorModel, [resultPort.sendPort, filename]); return (await resultPort.first); } void _readTensorModel(List<dynamic> args) async { SendPort responsePort = args[0]; File fileName = args[1]; var itp = Interpreter.fromFile(fileName); Isolate.exit(responsePort, itp); }
The text was updated successfully, but these errors were encountered:
I changed Isolate.exit to
Isolate.exit(responsePort, itp.address);
int address = isolateTask.spawnAndReceive(dataFile); interpreter = Interpreter.fromAddress(address);
and after this, I can get Instance using address. it works, but, Does this make sense for processing distribution?
Sorry, something went wrong.
No branches or pull requests
Since the screen drawing becomes unstable during loading, I am thinking of loading the model using Isolate.
I got an error with the code below.
thanks.
[ERROR:flutter/runtime/dart_isolate.cc(1107)] Unhandled exception:
Invalid argument: <- _interpreter in Instance of 'Interpreter' (from package:tflite_flutter/src/interpreter.dart)
The text was updated successfully, but these errors were encountered: