def read_my_file_format(filename_and_label_tensor):
    """Consumes a single filename and label as a ' '-delimited string.
  Args:
    filename_and_label_tensor: A scalar string tensor.
  Returns:
    Two tensors: the decoded image, and the string label.
  """
filename, label = tf.decode_csv(filename_and_label_tensor, [[''], ['']], ' ')
file_contents = tf.read_file(filename)
example = tf.image.decode_png(file_contents)
return example, label
Tensorflow читает изображения с метками