I build a model of neural network, and i want to change the value of a certain tensor within a session in tensorflow.

For example, if we ignore the model to simplify, but we have this tensor to optimize:

```
# construct an optimizer
train_op = tf.train.AdamOptimizer(learning_rate=0.05).minimize(cost)
```

After i can run my model in a session to train it.

But i want to open a session and change the value of tensor train_op, for example i have this:

```
with tf.Session() as sess:
#initialize all variables
tf.initialize_all_variables().run()
for i in range(iteraciones):
#Prepare input(minibach) to feed model
input_ = trainCluster0[0:len(train)]
# train model
sess.run(train_op, feed_dict={X: input_})
print(i, sess.run(cost, feed_dict={X: train}))
#Save model in last epoch
if(i == iteraciones-1):
save_path = saver.save(sess, "/tmp/model.ckpt")
print("Model saved.")
```

I want something as this:

```
with tf.Session() as sess:
#initialize all variables
tf.initialize_all_variables().run()
#Change value of tensor train_op
# train_op = tf.train.AdamOptimizer(learning_rate=value).minimize(cost)
...
...
for i in range(iteraciones):
#Prepare input(minibach) to feed model
input_ = trainCluster0[0:len(train)]
# train model
sess.run(train_op, feed_dict={X: input_})
print(i, sess.run(cost, feed_dict={X: train}))
#Save last epoch and test
if(i == iteraciones-1):
save_path = saver.save(sess, "/tmp/model.ckpt")
print("Model saved.")
```

How can i do this? that is, reuse the model with different optimization parameters.

Thanks in advance.

Solved: thanks to @jdehesa

The solutions is add this placeholder to the model:

And this for the sess.run: