问题内容: I’m trying to get shape of input tensor in C++ before I do any inference calls. So I can do it only from Graph Def. I’m trying like: auto att = graph_def.node(i).attr(); att["shape"].PrintDebugString(); Tensor tensor; std::cerr << tensor.FromProto(att["shape"].tensor()) << std::endl; And it returs false. While PrintDebugString prints: shape { dim { size: -1 }