Skip to content

Unhandled exception: type 'List<double>' is not a subtype of type 'List<int>' of 'value' #216

@zyrridian

Description

@zyrridian

I clone this example without changing anything and then run it perfectly fine, everything is working.

But when I change the model to this, the labels gone, in both gallery screen and live camera. This is the logs when I open live camera screen:

E/flutter (28541): [ERROR:flutter/runtime/dart_isolate.cc(1107)] Unhandled exception:
E/flutter (28541): type 'List<double>' is not a subtype of type 'List<int>' of 'value'
E/flutter (28541): #0      List.[]= (dart:core-patch/growable_array.dart:267:34)
E/flutter (28541): #1      Tensor._duplicateList (package:tflite_flutter/src/tensor.dart:237:10)
E/flutter (28541): #2      Tensor.copyTo (package:tflite_flutter/src/tensor.dart:203:7)
E/flutter (28541): #3      Interpreter.runForMultipleInputs (package:tflite_flutter/src/interpreter.dart:183:24)
E/flutter (28541): #4      Interpreter.run (package:tflite_flutter/src/interpreter.dart:172:5)
E/flutter (28541): #5      IsolateInference.entryPoint (package:image_classification/helper/isolate_inference.dart:84:19)
E/flutter (28541): <asynchronous suspension>

I'm not sure about this one, but I also got this message before unhandled exception:

E/System  (28541): java.util.concurrent.RejectedExecutionException: Task android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$9H0ZdANdMrdpoq2bfIL2l3DVsKk@5b79261 rejected from java.util.concurrent.ThreadPoolExecutor@5c91186[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 4]
E/System  (28541): 	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2085)
E/System  (28541): 	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
E/System  (28541): 	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
E/System  (28541): 	at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:624)
E/System  (28541): 	at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.onClosed(CallbackProxies.java:104)
E/System  (28541): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:582)
E/System  (28541): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.finalize(CameraCaptureSessionImpl.java:873)
E/System  (28541): 	at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:255)
E/System  (28541): 	at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:242)
E/System  (28541): 	at java.lang.Daemons$Daemon.run(Daemons.java:108)
E/System  (28541): 	at java.lang.Thread.run(Thread.java:764)
E/flutter (28541): #12     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737:22)
E/flutter (28541): #13     _dispatchPlatformMessage (dart:ui/hooks.dart:257:31)

I made this model using Teachable Machine with floating point conversion type. I saw many people struggle when they are trying to implement teachable machine model with this package, I hope someone could give an explanation about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions