TensorFlow tfrecords: tostring() changes dimension of image
问题 I have built a model to train a convolutional autoencoder in TensorFlow. I followed the instructions on Reading Data from the TF documentation to read in my own images of size 233 x 233 x 3. Here is my convert_to() function adapted from those instructions: def convert_to(images, name): """Converts a dataset to tfrecords.""" num_examples = images.shape[0] rows = images.shape[1] cols = images.shape[2] depth = images.shape[3] filename = os.path.join(FLAGS.tmp_dir, name + '.tfrecords') print(