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>
there is a way to get neural node from graph_def directly. if u only want the shape\type of node: "some_name":
void readPB(GraphDef & graph_def)
{
int i;
for (i = 0; i < graph_def.node_size(); i++)
{
if (graph_def.node(i).name() == "inputx")
{
graph_def.node(i).PrintDebugString();
}
}
}
results:
name: "inputx"
op: "Placeholder"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "shape"
value {
shape {
dim {
size: -1
}
dim {
size: 5120
}
}
}
}
try member functins of the node and get the informations.