title: How can I read binary file in Tensorflow
body: <p>I'm trying to read binary file in <strong>tensorflow</strong>.
  I want to ask, which method should I use, and how for reading binary file.
  In tensorflow, they recommends use dataset in tf.data.
  But I can't find simple example of using dataset, especially FixedLengthRecordDataset. I think I should use this method, but I don't know how to use. </p>
  
  <pre><code>[hg file] := [file header] [image1] [image2] [image3] ...
  
  [file header] := "hg  " (8 bytes)
  
  [imageN] := [image header] [image data]
  
  [image header] := [code(2 bytes)] [width (1 byte)] [height(1 byte)] [reserved(2 bytes)]
  
  [image data] := 256 gray data (width * height bytes, row-major format)
  </code></pre>
  
  <p>This is the format of my binary file.</p>
  
  <p>Please give me some advice for this work.</p>
  
  <p>EDIT : All images have different size. So maybe I can't use FixedLengthRecordDatasest. I think I have to convert all images to same size of dataset</p>