title: loading an image from cifar-10 dataset
body: <p>I am using cifar-10 dataset for my training my classifier. I have downloaded the dataset and tried to display am image from the dataset. I have used the following code:</p>
  
  <pre><code>from six.moves import cPickle as pickle
  from  PIL import Image
  import numpy as np
  
  f = open('/home/jayanth/udacity/cifar-10-batches-py/data_batch_1', 'rb')
  
  tupled_data= pickle.load(f, encoding='bytes')
  
  f.close()
  
  img = tupled_data[b'data']
  
  single_img = np.array(img[5])
  
  single_img_reshaped = single_img.reshape(32,32,3)
  
  plt.imshow(single_img_reshaped)
  </code></pre>
  
  <p>the description of data is as follows:
  Each array stores a 32x32 colour image. The first 1024 entries contain the red channel values, the next 1024 the green, and the final 1024 the blue. The image is stored in row-major order, so that the first 32 entries of the array are the red channel values of the first row of the image.</p>
  
  <p>Is my implementation correct?</p>
  
  <p>the above code gave me the following image:
  <a href="https://i.stack.imgur.com/vmPr0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vmPr0.png" alt="enter image description here"></a></p>