in src/train.py [0:0]
def _dataset_parser(value):
image_feature_description = {
'label': tf.io.FixedLenFeature([], tf.int64),
'image_raw': tf.io.FixedLenFeature([], tf.string)
}
example = tf.io.parse_single_example(value, image_feature_description)
image = tf.io.decode_raw(example['image_raw'], tf.float32)
image = tf.cast(image, tf.float32)
image.set_shape([DEPTH * HEIGHT * WIDTH])
image = tf.cast(tf.reshape(image, [HEIGHT, WIDTH, DEPTH]), tf.float32)
label = tf.cast(example['label'], tf.int32)
return image, tf.one_hot(label, NUM_CLASSES)