TF Select operators in tflite web runtime
See original GitHub issueSystem information
- TensorFlow.js version (you are using): 3.11.0
- Are you willing to contribute it (Yes/No): Yes, willing to help where possible
Describe the feature and the current behavior/state. While attempting to convert a TF SavedModel to tflite for use on the web, I got this error:
Some ops are not supported by the native TFLite runtime, you can enable TF kernels fallback using TF Select. See instructions: https://www.tensorflow.org/lite/guide/ops_select
TF Select ops: AddV2, ArgMax, BatchMatMulV2, Cast, GatherV2, MatMul, Mul, Range, RealDiv, Sigmoid, Softmax, StridedSlice, Transpose
And for another model, these were the missing ops:
AddV2, BatchMatMulV2, Cast, ConcatV2, Conv2D, Fill, GatherV2, MatMul, Mul, RealDiv, Sigmoid, Softmax, StridedSlice, Transpose
The linked docs don’t show how to run inference with the tflite web runtime (only Android, iOS, C++ and Python). I take this to imply that it’s not currently possible to use the extended set of ops with the tflite web runtime.
Will this change the current api? How? Unsure if this will be an API change or a build step in the tflite web runtime.
Who will benefit with this feature? Presumably the “Select TensorFlow operators” feature exists on other platforms due to developer demand. Web developers like myself would get the same benefits as developers on the other platforms.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Thank you so much for your insights on this @josephrocca! I agree with your points, especially about “strong fallback”.
I will take a closer look on this issue (focusing on the TF select ops) and see what I can find. (sorry, I am not exact sure the timeline, but this seems to be pretty useful thing to do so I will try to prioritize). Will also discuss this with my team.
Really appreciate it!
No problem, thanks for the update!