nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/api/iterator/MultipleEpochsIterator.java
@Override
    public DataSet next() {
        if (!iter.hasNext() && passes < numPasses) {
            passes++;
            batch = 0;
            log.info("Epoch " + passes + " batch " + batch);
            iter.reset();
        }
        batch++;

        DataSet next = iter.next();
        if (preProcessor != null)
            preProcessor.preProcess(next);
        return next;
    }
@Override
    public DataSet next() {
        if (!iter.hasNext() && passes < numPasses) {
            passes++;
            batch = 0;
            log.info("Epoch " + passes + " batch " + batch);
            iter.reset();
        }
        batch++;

        DataSet next = iter.next();
        if (preProcessor != null)
            preProcessor.preProcess(next);
        return next;
    }
@ Override public DataSet next ( ) { if ( ! iter . hasNext ( ) && passes < numPasses ) { passes ++ ; batch = 0 ; log . info ( "Epoch " + passes + " batch " + batch ) ; iter . reset ( ) ; } batch ++ ; DataSet next = iter . next ( ) ; if ( preProcessor != null ) preProcessor . preProcess ( next ) ; return next ; }
Returns the next element in the iteration.

@return the next element in the iteration
Returns the next element in the iteration .