tfjs
tfjs copied to clipboard
Loading TFLite models locally?
System information
- TensorFlow.js version (you are using):
4.8.0
- Are you willing to contribute it (Yes/No): Yes (if I am able)
Describe the feature and the current behavior/state.
tflite.loadTFLiteModel
does not take a tf.io.IOHandler
type to load local models with bundleResourceIO
like tf.loadLayersModel
and tf.loadGraphModel
do. If I am missing something here, please let me know, but it seems to me that this prevents me from loading models locally like I do with graph or layers models in React Native. I would like to be able to load locally stored tflite models with React Native.
Will this change the current api? How?
Ideally tflite.loadTFLiteModel
would take in a tf.io.IOHandler
type in addition to the current string
and ArrayBuffer
types to mirror the API for tf.loadLayersModel
and tf.loadGraphModel
.
Who will benefit with this feature? React Native developers using tfjs.
Any Other info. If there is already a supported method for loading models locally, it would be nice to see some examples in the documentation.