title: Incrementing variable as a copy in Tensorflow
body: <p>I currently have the following code which I would like to use to provide a "stream" of incrementing integers.</p>
  
  <pre><code>import tensorflow as tf
  ...
  record_count = tf.user_ops.my_custom_op(...) # something I write in C++ of Python
  ...
  my_variable = tf.Variable(0, dtype=dtypes.int64)
  my_var_incremented = my_variable.assign_add(math_ops.to_int64(record_count))
  queued_increment = tf.train.input.batch((my_variable,), 1)
  </code></pre>
  
  <p>But the issue is that <code>queued_increment</code> is just a reference to <code>my_variable</code>, when I just want to enqueue a copy of <code>my_variable</code> after incrementing it.</p>
  
  <p>Is this the correct way to go about this, or am I missing something?</p>