code: public void fit(@NonNull DataSetIterator iterator, int numEpochs){
          Preconditions.checkArgument(numEpochs > 0, "Number of epochs much be > 0. Got numEpochs = %s", numEpochs);
          Preconditions.checkArgument(numEpochs == 1 || iterator.resetSupported(), "Cannot perform multiple epochs training using" +
                  "iterator thas does not support resetting (iterator.resetSupported() returned false)");
  
          for(int i=0; i<numEpochs; i++ ){
              fit(iterator);
          }
      }
docs: Perform minibatch training on all minibatches in the DataSetIterator, for the specified number of epochs.
  Equvalent to calling {@link #fit(DataSetIterator)} numEpochs times in a loop
  
  @param iterator  Training data (DataSetIterator). Iterator must support resetting
  @param numEpochs Number of training epochs, >= 1