def read_and_decode(filename_queue):
reader = tf.TFRecordReader()
_, serialized_example = reader.read(filename_queue)
fe
You're very close to having a working solution! Right now there's no automatic way to give TensorFlow a list made up of tensors and numbers and make a tensor from it, which tf.reshape() is expecting. The answer is to use tf.stack(), which explicitly takes a list of N-dimensional tensors (or things convertible to tensors) and packs them into an (N+1)-dimensional tensor.
This means you can write:
features = ... # Parse from an example proto.
height = tf.cast(features['height'], tf.int32)
width = tf.cast(features['width'], tf.int32)
image = tf.reshape(image, tf.stack([height, width, 3]))