code: public Evaluation evaluate(DataSetIterator iterator, List<String> labelsList, int topN) {
          if (layers == null || !(getOutputLayer() instanceof IOutputLayer)) {
              throw new IllegalStateException("Cannot evaluate network with no output layer");
          }
          if (labelsList == null) {
              try {
                  labelsList = iterator.getLabels();
              } catch (Throwable t){ }    //Ignore, maybe UnsupportedOperationException etc
          }
  
          Layer outputLayer = getOutputLayer();
          if(getLayerWiseConfigurations().isValidateOutputLayerConfig()){
              OutputLayerUtil.validateOutputLayerForClassifierEvaluation(outputLayer.conf().getLayer(), Evaluation.class);
          }
  
          Evaluation e = new org.deeplearning4j.eval.Evaluation(labelsList, topN);
          doEvaluation(iterator, e);
  
          return e;
      }
docs: Evaluate the network (for classification) on the provided data set, with top N accuracy in addition to standard accuracy.
  For 'standard' accuracy evaluation only, use topN = 1
  
  @param iterator   Iterator (data) to evaluate on
  @param labelsList List of labels. May be null.
  @param topN       N value for top N accuracy evaluation
  @return Evaluation object, summarizing the results of the evaluation on the provided DataSetIterator