[HN Gopher] Show HN: Txeo - A Modern C++ Wrapper for TensorFlow
       ___________________________________________________________________
        
       Show HN: Txeo - A Modern C++ Wrapper for TensorFlow
        
       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.
        
       Author : rdabra
       Score  : 33 points
       Date   : 2025-02-21 16:40 UTC (6 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | klaussilveira wrote:
       | Love the ergonomics:
       | https://github.com/rdabra/txeo/blob/main/examples/txeo_predi...
        
         | pjmlp wrote:
         | Yes, C++ can be made as nice as C#, Kotlin and such.
         | 
         | That 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
        
           | SunlitCat wrote:
           | > Python like coding
           | 
           | 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?
        
       | kevmo314 wrote:
       | If this had come five years ago perhaps TensorFlow could've stood
       | a chance against PyTorch. Switching from TensorFlow to PyTorch
       | was such a breath of fresh air, I definitely could have used
       | something like this.
        
       | ipsum2 wrote:
       | Why? TensorFlow has been abandoned by Google. Open source uses
       | PyTorch, and internally at Google, all new model development is
       | done in Jax. Only TensorFlow-Serving and tfdata are still used
       | parts of TensorFlow.
        
         | mindcrime wrote:
         | The project looks fairly active, based on the commit history:
         | 
         | https://github.com/tensorflow/tensorflow/commits/master/
        
           | ototot wrote:
           | It could be the code still stay there, but the direction has
           | been changed.
        
         | saidinesh5 wrote:
         | What about embedded/mobile environments?
         | 
         | 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.
        
         | synergy20 wrote:
         | it's not abandoned nor deprecated, google still depends on it
         | to run the models in production. Google just splits the model
         | development into JAX. They're companions to each other and
         | equally important down the road.
        
       | albertzeyer wrote:
       | I have worked both with the TensorFlow C++ API and the TensorFlow
       | Python API. While the TF Python API is basically only a wrapper
       | around the TF C++ API, it adds a lot of things on top, e.g. many
       | higher-level functions you would want to use to define neural
       | networks, etc. If you know PyTorch, think about torch.nn. Most
       | crucially, calculating the gradients, i.e. doing
       | backprop/autograd, was also purely implemented in Python. Even to
       | define the gradient per each operation was done in Python. The
       | C++ core did not know anything about this. (I'm not exactly sure
       | how much this changed with eager mode and gradient tapes
       | though...)
       | 
       | 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.
        
       ___________________________________________________________________
       (page generated 2025-02-21 23:01 UTC)