title: Making your own set of MNIST data (identical to MNIST format)
body: <p>I'm trying to create my own version of MNIST data. I've converted my training and testing data to the following files;</p>
  
  <pre><code>test-images-idx3-ubyte.gz
  test-labels-idx1-ubyte.gz
  train-images-idx3-ubyte.gz
  train-labels-idx1-ubyte.gz
  </code></pre>
  
  <p>(For anyone interested I did this using <a href="https://github.com/gskielian/JPG-PNG-to-MNIST-NN-Format" rel="noreferrer">JPG-PNG-to-MNIST-NN-Format</a> which seems to get me close to what I'm aiming for.)</p>
  
  <p>However this isn't quite the same as the file type and format of the MNIST data (mnist.pkl.gz). I understand that pkl means the data has been pickled, but I don't really understand the process of pickling the data - is there a specific order to the pickling? Can someone provide code that I should use to pickle my data?</p>