title: Find all variables in a Tensorflow subgraph defined by a tensor
body: <p>I have a Tensor <code>net</code> that is the result of a computational graph. The graph involves some variables (e.g. <code>weights1</code>, <code>biases1</code>) which hold parameters of the models. Is there a way to obtain the variables given <code>net</code>? Something like: </p>
  
  <p><code>[weights1, biases1] = tf.get_all_variables_for_op(net)</code></p>