title: How to get reference by name of variable/placeholder?
body: <p>By names I'm referring to:</p>
  
  <pre><code>tf.placeholder(tf.float32, name='NAME')
  tf.get_variable("W", [n_in, n_out],initializer=w_init())
  </code></pre>
  
  <p>I have several placeholders which I want to access from outside functions without passing the reference, with the assumption that placeholders holding the given names exist how can you get a reference to them? (this is all during graph construction, not runtime)</p>
  
  <p>And my second question is how can I get all variables that hold a given name no matter the scope?</p>
  
  <p>Example: All my weights have the name "W" under many scopes, I want to get them all into a list. I do not want to add each one manually. The same can be done with the biases, lets say I want to do a histogram.</p>