title: Tensorflow: Print contents of a tensor in C++
body: <p>How do I print to screen contents of a tensor defined as below</p>
  
  <pre><code>std::vector&lt;tensorflow::Tensor&gt; finalOutput;
  </code></pre>
  
  <p>and which is assigned value by running the following operation </p>
  
  <pre><code>tensorflow::Status run_status = session-&gt;Run({{"x",input_tensor}, 
                                                         {"keep_prob", keep_prob}},
                                                        {"prediction"},
                                                        {},
                                                    &amp;finalOutput);
  </code></pre>