def read_cifar10(filename_queue):
 class CIFAR10Record(object, ):
  pass
 result = CIFAR10Record()
 label_bytes = 1
 result.height = 32
 result.width = 32
 result.depth = 3
 image_bytes = ((result.height * result.width) * result.depth)
 record_bytes = (label_bytes + image_bytes)
 reader = tf.FixedLengthRecordReader(record_bytes=record_bytes)
 (result.key, value) = reader.read(filename_queue)
 record_bytes = tf.decode_raw(value, tf.uint8)
 result.label = tf.cast(tf.strided_slice(record_bytes, [0], [label_bytes]), tf.int32)
 depth_major = tf.reshape(tf.strided_slice(record_bytes, [label_bytes], [(label_bytes + image_bytes)]), [result.depth, result.height, result.width])
 result.uint8image = tf.transpose(depth_major, [1, 2, 0])
 return result

def read_cifar10 ( filename_queue ) : class CIFAR10Record ( object , ) : pass result = CIFAR10Record ( ) label_bytes = 1 result . height = 32 result . width = 32 result . depth = 3 image_bytes = ( ( result . height * result . width ) * result . depth ) record_bytes = ( label_bytes + image_bytes ) reader = tf . FixedLengthRecordReader ( record_bytes = record_bytes ) ( result . key , value ) = reader . read ( filename_queue ) record_bytes = tf . decode_raw ( value , tf . uint8 ) result . label = tf . cast ( tf . strided_slice ( record_bytes , [ 0 ] , [ label_bytes ] ) , tf . int32 ) depth_major = tf . reshape ( tf . strided_slice ( record_bytes , [ label_bytes ] , [ ( label_bytes + image_bytes ) ] ) , [ result . depth , result . height , result . width ] ) result . uint8image = tf . transpose ( depth_major , [ 1 , 2 , 0 ] ) return result
reads and parses examples from cifar10 data files .