can't get variables from TF collection Aurelion Geron's example shows how to stored selected operations in a collection, so they can then be easily accessed later:

Adding:

for op in (X, y, accuracy, training_op):
    tf.add_to_collection("my_important_ops", op)


Then retrieving:

X, y, accuracy, training_op = tf.get_collection("my_important_ops")


However when I try to do this I get this error:

X, y, accuracy, training_op = tf.get_collection("my_important_ops")
ValueError: too many values to unpack (expected 4)


What am I doing wrong?
A simple solution is to do the following:

temp = tf.get_collection("my_important_ops")
print(temp.get_shape().as_list())


Then you can evaluate the outputs.