Reputation: 766
I am learning TensorFlow, but can't find any conclusive documentation on this. Is it possible to dynamically remove variables from an initialized session? Or add variables similarly? Would this require recompiling/initialising the computational graph every time?
Upvotes: 4
Views: 1283
Reputation: 4143
You can add individual variables to the session using
init_new_vars_op = tf.initialize_variables([v_6, v_7, v_8])
sess.run(init_new_vars_op)
Doesn't require recompiling the graph.
Don't know about removing variables, I haven't found anything either, anyone else have any ideas?
Upvotes: 2