Hey everyone! :wave: I’ve been working on somethin...
# feed
s
Hey everyone! 👋 I’ve been working on something I think some of you might find interesting — KTensorFlow, a library that makes it easier to integrate TensorFlow Lite (LiteRT) models into Kotlin Multiplatform projects. KTensorFlow supports: • Loading
.tflite
models from the shared KMP module without writing platform-specific code, with extensions for Moko and Compose Resources • Running inference across Android and iOS with a unified API • Hardware acceleration with GPU and NPU • Tensors – creation, casting, mapping, arithmetic operations,
argmax
, and
argmin
• A Pipeline module to simplify data preprocessing and postprocessing • Platform-specific functions for more fine-grained inference setup Next features on the roadmap: • Media and text processing utilities • Add more built-in Tensor extension functions • Add more built-in Pipeline stages You can check it out here! 👉 github.com/kursor1337/KTensorFlow What started as a graduation project slowly turned into my personal passion, so I’d love to hear your feedback, ideas, contributions and — of course — stars. They’d help me make this library even better.
🔥 8
K 3
a
Nice. Tensorflow module exists in KMath for some time (https://github.com/SciProgCentre/kmath/tree/dev/kmath-tensorflow). There was an idea for TensorFlow MP access for some time, but we did not have resources for that. You are welcome to discuss it further in #CE5HPKBRN
s
Hi, sorry for the late reply. I checked KMath's TensorFlow module out, looks cool! Are you suggesting for me to contribute?
a
This is for you to decide. All contributions are welcome, of course. The general idea is to make it possible to use tensorflow for regular mathematical operations. Right now it is already possible to create a lazy tensorflow graph the same way you write formulas. The API is quite limited though.