title: How to print weights in Tensorflow?
body: <p>I am trying to get the weight matrix of my hidden_layer2 and print it.
  It seems like I am able to get the weight matrix, but I am not able to print it. </p>
  
  <p>When using <code>tf.Print(w, [w])</code> it prints nothing.
  When using <code>print(tf.Print(w,[w])</code> it prints at least the info about the tensor:</p>
  
  <pre><code>Tensor("hidden_layer2_2/Print:0", shape=(3, 2), dtype=float32)
  </code></pre>
  
  <p>I also tried to use <code>tf.Print()</code> outside of the <strong>with</strong>-Statement, same result.</p>
  
  <p>Full code is here, I am just processing random data in a feed-forward NN: <a href="https://pastebin.com/KiQUBqK4" rel="noreferrer">https://pastebin.com/KiQUBqK4</a></p>
  
  <p>A part of my Code:</p>
  
  <pre><code>hidden_layer2 = tf.layers.dense(
          inputs=hidden_layer1,
          units=2,
          activation=tf.nn.relu,
          name="hidden_layer2")
  
  
  with tf.variable_scope("hidden_layer2", reuse=True):
          w = tf.get_variable("kernel")
          tf.Print(w, [w])
          # Also tried tf.Print(hidden_layer2, [w])
  </code></pre>