title: Caffe: Understanding expected lmdb datastructure for blobs
body: <p>I'm trying to understand how data is interpreted in Caffe.
  For that I've taken a look at the <a href="http://caffe.berkeleyvision.org/gathered/examples/mnist.html">Minst Tutorial</a>
  Looking at the input data definition:</p>
  
  <pre><code>layers {
    name: "mnist"
    type: DATA
    data_param {
      source: "mnist_train_lmdb"
      backend: LMDB
      batch_size: 64
      scale: 0.00390625
    }
    top: "data"
    top: "label"
  }
  </code></pre>
  
  <p>I've now looked at the mnist_train_lmdb and taken one of the entries (shown in hex):</p>
  
  <pre><code>0801101C181C229006
  00000000000000000000000000000000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  00000000000054B99F973C2400000000000000000000000000000000
  000000000000DEFEFEFEFEF1C6C6C6C6C6C6C6C6AA34000000000000
  00000000000043724872A3E3FEE1FEFEFEFAE5FEFE8C000000000000
  000000000000000000000011420E4343433B15ECFE6A000000000000
  00000000000000000000000000000000000053FDD112000000000000
  000000000000000000000000000000000016E9FF5300000000000000
  000000000000000000000000000000000081FEEE2C00000000000000
  000000000000000000000000000000003BF9FE3E0000000000000000
  0000000000000000000000000000000085FEBB050000000000000000
  00000000000000000000000000000009CDF83A000000000000000000
  0000000000000000000000000000007EFEB600000000000000000000
  00000000000000000000000000004BFBF03900000000000000000000
  0000000000000000000000000013DDFEA60000000000000000000000
  00000000000000000000000003CBFEDB230000000000000000000000
  00000000000000000000000026FEFE4D000000000000000000000000
  00000000000000000000001FE0FE7301000000000000000000000000
  000000000000000000000085FEFE3400000000000000000000000000
  000000000000000000003DF2FEFE3400000000000000000000000000
  0000000000000000000079FEFEDB2800000000000000000000000000
  0000000000000000000079FECF120000000000000000000000000000
  00000000000000000000000000000000000000000000000000000000
  2807
  </code></pre>
  
  <p>(I've added the line breaks here to be able to see the '7' digit.)</p>
  
  <p>Now my question is, <strong>where this format is described?</strong> Or put differently where is defined that the first 36 bytes are some sort of header and the last 8 bytes have some label correspondence?</p>
  
  <p><strong>How would I go about constructing my own data?</strong>
  Neither <a href="http://caffe.berkeleyvision.org/tutorial/net_layer_blob.html">Blob Tutorial</a> nor <a href="http://caffe.berkeleyvision.org/tutorial/layers.html">Layers Definition</a> give much away about required formats. <em>My intention is not to use image data, but time series</em></p>
  
  <p>Thanks!</p>