Show HN: Txeo – A Modern C++ Wrapper for TensorFlow (github.com)
Txeo is a lightweight and intuitive C++ wrapper for TensorFlow, designed to simplify TensorFlow C++ development while preserving high performance and flexibility. Built entirely with Modern C++, Txeo allows developers to use TensorFlow with the ease of a high-level API, eliminating the complexity of its low-level C++ interface.
18 comments
[ 3.3 ms ] story [ 48.7 ms ] threadThat is what made me appreciate it with modern frameworks like OWL and Turbo Vision back in the day.
Unfortunately too many folks insist in C style coding, which kills ergonomics like those.
Additionally now at C++20 [0], there are plenty of improvements for Python like coding.
[0] - C++23 is pretty much WIP
Please noooooooooo! I don't want to have to watch out how many indentations I've made, just for making sure I don't get any weird errors! (Just kidding!)
Do you have any (quick) examples what you mean with python like?
Some forced example, combining ranges with type deduction for collection types and simplified print, for a C++ version of using itertools.
Full example at https://godbolt.org/z/5YcoM1WsYThere you will see the comments why fmt and not std, just because of current compiler support, hence why I said on my previous comment, C++20 is still the best supported one currently.
Especially ranges and views are two of my favorite features I'm looking forward to use more.
https://github.com/tensorflow/tensorflow/commits/master/
Are these other APIs as good as leveraging the hardware accelerators via hardware vendor provided drivers as tensorflow these days? (For nnapi etc ...).
I haven't touched these apis recently but back in 2020 or so the easiest way to use models like yolo was via tflite on those systems.
So, that makes implementing training with only the C++ API quite a big task. You first need to define all the gradients, and then implement backprop / autograd.
We use the C API to generate gradients for TF-Java, and have some success training models with it. Replicating the Python bits in another language is a huge effort though that we haven't completed.