# Using \`ed.copy()\` twice on the same Tensor

**URL:** <https://discourse.edwardlib.org/t/using-ed-copy-twice-on-the-same-tensor/492>\
**Category:** General\
**Created:** [November 16, 2017, 6:46pm UTC](https://discourse.edwardlib.org/t/using-ed-copy-twice-on-the-same-tensor/492 "2017-11-16T18:46:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jim](https://discourse.edwardlib.org/u/jim)\
**Post date:** [November 16, 2017, 6:46pm UTC](https://discourse.edwardlib.org/t/using-ed-copy-twice-on-the-same-tensor/492/1 "2017-11-16T18:46:11Z")

</div>

Hi All,

I am trying to understand the behavior of the `ed.copy()` command. I am trying to copy a tensor twice and getting odd results

```
import tensorflow as tf
import edward as ed

# a simple forward model

X = ed.models.Beta( concentration0=1., concentration1=1., name="X" )
y = tf.pow(X,2.,name="Y")

# 1st copy

Xtest1 = tf.placeholder( tf.float32, name="Xtest1" )
ytest1 = ed.copy( y, dict_swap={X:Xtest1} )

# 2nd copy

Xtest2 = tf.placeholder( tf.float32, name="Xtest2" )
ytest2 = ed.copy( y, dict_swap={X:Xtest2} )

# evaluate the second copy

sess = ed.get_session()
print sess.run( ytest2, feed_dict={Xtest2:2.})

```

which fails:

```
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'Xtest1' with dtype float
 [[Node: Xtest1 = Placeholder[dtype=DT_FLOAT, shape=<unknown>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

```

Here’s what I don’t understand: **Why does `ytest2` need to be fed with `Xtest1`?**. I imagined that `Xtest1` is not a parent of `ytest2`, or of `y`.
