null check operator used on a null value
NQHuy1905 opened this issue · comments
NQHuy1905 commented
Talha2023azzurri commented
provide all code its not coming from the code you provide
Tyler Christensen commented
I am having the same issue. The issue is coming from runForMultipleInputs()
in interpreter.dart
Model: blaze_face_short_range.tflite
The interpreter outputShape
is [1,896,16] but the outputTensors
in runForMultipleInputs()
is [ 2, 896, 16]
final output = [
List.filled(896, List.filled(16, 0.0))
];
interpreter.run(input, output);
interpreter.dart:
void runForMultipleInputs(List<Object> inputs, Map<int, Object> outputs) {
if (outputs.isEmpty) {
throw ArgumentError('Input error: Outputs should not be null or empty.');
}
runInference(inputs);
var outputTensors = getOutputTensors();
for (var i = 0; i < outputTensors.length; i++) {
outputTensors[i].copyTo(outputs[i]!);
}
}
This project is based off of the Image Segmentation example at https://github.com/tensorflow/flutter-tflite/tree/main/example/image_segmentation