title: In Tensorflow, get the names of all the Tensors in a graph using c++
body: <p>After loading a ".pb" model using c++,<br>
  How to get the name value (i.e add &amp; output_TT) using c++ using <strong>tensorflow</strong> libraries.</p>
  
  <p>The layers in .pb file are as below:</p>
  
  <pre><code>node {
    name: "add"
    op: "Add"
    input: "MatMul"
    input: "bias/read"
    attr {
      key: "T"
      value {
      type: DT_FLOAT
      }
    }
  }
  node {
    name: "output_TT"
    op: "Softmax"
    input: "add"
    attr {
      key: "T"
      value {
        type: DT_FLOAT
      }
    }  
  }
  </code></pre>
  
  <p>I am not using bazel to build; instead I executed the inbuild makefile with some customisations.</p>