title: Unable to load CIFAR-10 dataset: Invalid load key '\x1f'
body: <p>I'm currently playing around with some neural networks in TensorFlow - I decided to try working with the CIFAR-10 dataset. I downloaded the "CIFAR-10 python" dataset from the website: <a href="https://www.cs.toronto.edu/~kriz/cifar.html" rel="nofollow noreferrer">https://www.cs.toronto.edu/~kriz/cifar.html</a>.</p>
  
  <p>In Python, I also tried directly copying the code that is provided to load the data:</p>
  
  <pre><code>def unpickle(file):
  import pickle
  with open(file, 'rb') as fo:
      dict = pickle.load(fo, encoding='bytes')
  return dict
  </code></pre>
  
  <p>However, when I run this, I end up with the following error: <code>_pickle.UnpicklingError: invalid load key, '\x1f'.</code> I've also tried opening the file using the gzip module (<code>with gzip.open(file, 'rb') as fo:</code>), but this didn't work either. </p>
  
  <p>Is the dataset simply bad, or this an issue with code? If the dataset's bad, where can I obtain the proper dataset for CIFAR-10?</p>