@ Override public List < DataSet > batchBy ( int num ) { List < DataSet > batched = Lists . newArrayList ( ) ; for ( List < DataSet > splitBatch : Lists . partition ( asList ( ) , num ) ) { batched . add ( DataSet . merge ( splitBatch ) ) ; } return batched ; }
Partitions a dataset in to mini batches where each dataset in each list is of the specified number of examples