TensorFlow C++ API: Guides/Documentation?

Hi there,
I’m pretty new in regards to TensorFlow and am currently trying to figure out how to work with the C++ API of TensorFlow and how functional it is for my use case(see below).

However it seems, that the official guides and most of online documentation focus on the python implementation. This is not usable for me though, since I need to work with C++ only.

Is there some form of (un)official documentation for the C++ API which explains how to use it properly?
So far I was only able to load my model with the help of this explanation:

However I would like to be able to know how to properly work with the underlying layers in C++.
If this is possible at all.

Thank you for any form of help you might provide.

My use-case:
In a first step, I would like to be able to load a pretrained model in C++ and just connect input and output respectively to my underlying program.

As a second step, I would like to find out, if it is possible to “slice” the pretrained model into its layers, feed it with extracted weights of the pretrained model and connect these layers in a way, that I end up with a model, where each layer is represented by its own program, while the weights from the pretraining would still retain its original function.

Kind Regards,

You can see some good example about manipulating Tensorflow C API at:

You can access to layer weights with:

If you want to use instead TFlite or TFlite Micro for inference they already have their own c++ API documented.

But to manipulate TFlite weights for inference you could check:

To just read weights in TFlite c++:

1 Like