title: How to print a tensor without showing gradients
body: <p>If I do something like this:</p>
  
  <pre><code>tmp = torch.ones(3, 2, 2, requires_grad=True)
  out = tmp ** 2
  print("\n{}".format(out))
  </code></pre>
  
  <p>I get as an output:</p>
  
  <pre><code>tensor([[[1., 1.],
           [1., 1.]],
  
          [[1., 1.],
           [1., 1.]],
  
          [[1., 1.],
           [1., 1.]]], grad_fn=&lt;PowBackward0&gt;)
  </code></pre>
  
  <p>I would like to print out just the values, not the grad_fn part.</p>
  
  <p>However, doing</p>
  
  <pre><code>print("\n{}".format(out[0]))
  </code></pre>
  
  <p>results in:</p>
  
  <pre><code>tensor([[1., 1.],
          [1., 1.]], grad_fn=&lt;SelectBackward&gt;)
  </code></pre>
  
  <p>The only way I know is to <code>out.detach()</code> or there is another/better way? Just to clarify, I am happy the gradient is calculated. I just want to show the vector values without additional data.</p>