am15h / tflite_flutter_plugin

TensorFlow Lite Flutter Plugin
https://pub.dev/packages/tflite_flutter
Apache License 2.0
507 stars 353 forks source link

Unable to create interpreter #61

Open jaweii opened 3 years ago

jaweii commented 3 years ago
I/tflite  (10801): Created TensorFlow Lite delegate for GPU.
I/tflite  (10801): Initialized TensorFlow Lite runtime.
E/tflite  (10801): Following operations are not supported by GPU delegate:
E/tflite  (10801): EXP: Operation is not supported.
E/tflite  (10801): SPLIT: Operation is not supported.
E/tflite  (10801): SPLIT_V: Operation is not supported.
E/tflite  (10801): 80 operations will run on the GPU, and the remaining 64 operations will run on the CPU.
E/tflite  (10801): Can not open OpenCL library on this device - dlopen failed: library "libOpenCL.so" not found
E/tflite  (10801): Falling back to OpenGL
D/        (10801): HostConnection::get() New Host Connection established 0x7fb7d140, tid 10858
D/EGL_emulation(10801): eglCreateContext: 0x85aa7220: maj 3 min 0 rcv 3
E/EGL_emulation(10801): rcMakeCurrent returned EGL_FALSE
E/EGL_emulation(10801): tid 10858: eglMakeCurrent(1590): error 0x3006 (EGL_BAD_CONTEXT)
E/libEGL  (10801): eglMakeCurrent:1062 error 3006 (EGL_BAD_CONTEXT)
E/tflite  (10801): TfLiteGpuDelegate Init: No EGL error, but eglMakeCurrent failed.
I/tflite  (10801): Created 0 GPU delegate kernels.
E/tflite  (10801): TfLiteGpuDelegate Prepare: delegate is not initialized
E/tflite  (10801): Node number 144 (TfLiteGpuDelegateV2) failed to prepare.
E/tflite  (10801): Restored original execution plan after delegate application failure.

any solution?

am15h commented 3 years ago

@jaweii I think you should try without GPU delegate certain ops seem to be unsupported. Also, can you share how you obtained the .tflite model?

am15h commented 3 years ago

@jaweii Any update regarding your progress with the issue?

jaweii commented 3 years ago

Seems like it is not support gpu for iOS.

------------------ Original ------------------ From: Amish Garg <notifications@github.com> Date: Wed,Feb 3,2021 5:50 AM To: am15h/tflite_flutter_plugin <tflite_flutter_plugin@noreply.github.com> Cc: 朱嘉伟 <1005945485@qq.com>, Mention <mention@noreply.github.com> Subject: Re: [am15h/tflite_flutter_plugin] Unable to create interpreter (#61)

Sankyuubigan commented 2 years ago

ArgumentError (Invalid argument(s): Failed to load dynamic library 'libtensorflowlite_c.so': dlopen failed: library "libtensorflowlite_c.so" not found)

same error when calling "interpreter = Interpreter.fromFile(dataFile);"

I launch install.bat file as writed in instruction. I don't have delegates.

Ahmad0Tanveer commented 1 year ago

first of click on install.bat file in window and than -> flutter clean -> flutter pub get and than run if this not working see my example https://github.com/Ahmad0Tanveer/object_detection