There's TF_GraphGetTensorShape in C API, but the interface isn't compatible with C++ Graph and Output. How to do the same using tensorflow C/C++ API?
For example. How to get the returned tensor shape of Slice operation using C++ API and then using that tensor shape to make a variable with the same shape?