title: Exporting image array to TFRecord in Google Earth Engine
body: <p>I want to convert a collection of 3 Landsat images (each 12 band) to a single image array and then export it in TFRecord format. I used below code. My input collection is named <code>images</code>. <code>imageT</code> is the accumulated image, starting with a zero band which is dropped at the end. Each pixel of final <code>imageOfSeries</code> image contain a matrix of size 3x12:</p>
  
  <pre><code>var imageT = ee.Image(0)
  images = images.map(function(image){
    return image.toArray();
  })   
  var accumulate = function(image, imageT) {
    return(ee.Image(imageT).addBands(image)) 
  };
  var imageOfSeries = ee.Image(images.iterate(accumulate, imageT))
                               .slice(1).toArray(1).matrixTranspose()        
  Export.image.toDrive({
    image: imageOfSeries,
    description: 'imageOfSeriesExample',
    scale: 30,
    region: geometry,
    fileFormat: 'TFRecord',
    formatOptions: {
      patchDimensions: [10,10],
      tensorDepths: [3,12]
    }
  });
  </code></pre>
  
  <p>But GEE returns an error when running the export task and says that <code>Arrays must have dimensions = 1</code>.
  How can I do my task? I also need to have more information on how to decode the TFRecord file in such a case, for which I couldn't find any example in GEE tutorial. </p>