def ld_cifar10(test_only=False):
 file_urls = ['https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz']
 local_urls = maybe_download(file_urls, FLAGS.data_dir)
 dataset = extract_cifar10(local_urls[0], FLAGS.data_dir)
 (train_data, train_labels, test_data, test_labels) = dataset
 train_data = image_whitening(train_data)
 test_data = image_whitening(test_data)
 if test_only:
  return (test_data, test_labels)
 else:
  return (train_data, train_labels, test_data, test_labels)

def ld_cifar10 ( test_only = False ) : file_urls = [ 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz' ] local_urls = maybe_download ( file_urls , FLAGS . data_dir ) dataset = extract_cifar10 ( local_urls [ 0 ] , FLAGS . data_dir ) ( train_data , train_labels , test_data , test_labels ) = dataset train_data = image_whitening ( train_data ) test_data = image_whitening ( test_data ) if test_only : return ( test_data , test_labels ) else : return ( train_data , train_labels , test_data , test_labels )
load the original cifar10 data .