parameters: (filename)
docstring: Validate that filename corresponds to labels for the MNIST dataset.
docstring_summary: Validate that filename corresponds to labels for the MNIST dataset.
docstring_tokens: Validate that filename corresponds to labels for the MNIST dataset .
function: def check_labels_file_header(filename):
    """Validate that filename corresponds to labels for the MNIST dataset."""
    with tf.gfile.Open(filename, 'rb') as f:
      magic = read32(f)
      read32(f)  # num_items, unused
      if magic != 2049:
        raise ValueError('Invalid magic number %d in MNIST file %s' % (magic,
                                                                       f.name))
function_tokens: def check_labels_file_header ( filename ) : with tf . gfile . Open ( filename , 'rb' ) as f : magic = read32 ( f ) read32 ( f ) # num_items, unused if magic != 2049 : raise ValueError ( 'Invalid magic number %d in MNIST file %s' % ( magic , f . name ) )