react-native-fast-tflite icon indicating copy to clipboard operation
react-native-fast-tflite copied to clipboard

Clarification Needed on TensorFlow Lite Version and GPU Acceleration Configuration

Open bglgwyng opened this issue 6 months ago • 7 comments

Thank you for developing this excellent library. I've been using the native TensorFlow Lite library directly with Swift/Kotlin and am now migrating my code to use react-native-fast-tflite. Having experience configuring TensorFlow Lite, I have a couple of questions regarding the Android configuration:

  1. Version Selection: Why does this library use an older version of TensorFlow Lite (2.12.0) instead of the latest version (2.16.1)? Is there a specific reason for pinning to this older version?

  2. GPU Acceleration Configuration: I noticed that 'uses-native-library' declarations are required to enable GPU acceleration. While I understand their necessity (as GPU loading fails without them), I'm curious about why they're needed here when they weren't required in my previous direct TensorFlow Lite implementations.

For context, when I previously installed TensorFlow Lite directly, the following Gradle dependencies were sufficient for GPU acceleration:

implementation 'org.tensorflow:tensorflow-lite:2.15.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.15.0'
implementation 'org.tensorflow:tensorflow-lite-gpu-api:2.15.0'

Is the need for these additional configurations related to the older TensorFlow Lite version (2.12.0) used in this library? Or am I missing something?

bglgwyng avatar Aug 20 '24 13:08 bglgwyng