What is the C++ equivalent of python: tf.Graph.get_tensor_by_name(name) in Tensorflow? Thanks!
Here is the code I am trying to run, but I get an empty output>
In case anybody is interested, here is how you extract the shape of an arbitrary sensor from graph_def using the tensorflow C++ API
vector get_shape_of_tensor(tensorflow::GraphDef graph_def, std::string name_tensor)
{
vector tensor_shape;
for (int i=0; i < graph_def.node_size(); ++i) {
if (graph_def.node(i).name() == name_tensor) {
auto node = graph_def.node(i);
auto attr_map = node.attr();
for (auto it=attr_map.begin(); it != attr_map.end(); it++) {
auto key = it->first;
auto value = it->second;
if (value.has_shape()) {
auto shape = value.shape();
for (int i=0; i