rescaling + partitioning in minibatches