code: public INDArray asImageMiniBatches(File f, int numMiniBatches, int numRowsPerSlice) {
          try {
              INDArray d = asMatrix(f);
              return Nd4j.create(numMiniBatches, numRowsPerSlice, d.columns());
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Slices up an image in to a mini batch.
  
  @param f               the file to load from
  @param numMiniBatches  the number of images in a mini batch
  @param numRowsPerSlice the number of rows for each image
  @return a tensor representing one image as a mini batch