code: def sweepCrossValidation(self):
          
          # get learning value and then turn it off
          oldLearning = self.learning
          self.learning = 0
          tssError = 0.0; totalCorrect = 0; totalCount = 0; totalPCorrect = {}
          self._cv = True # in cross validation
          if self.autoCrossValidation:
              for i in range(len(self.inputs)):
                  set = self.getDataCrossValidation(i)
                  self._sweeping = 1
                  (error, correct, total, pcorrect) = self.step( **set )
                  self._sweeping = 0
                  if self.crossValidationReportLayers != []:
                      (error, correct, total, pcorrect) = self.getError( *self.crossValidationReportLayers )
                  tssError += error
                  totalCorrect += correct
                  totalCount += total
                  sumMerge(totalPCorrect, pcorrect)
          else:
              for set in self.crossValidationCorpus:
                  self._sweeping = 1
                  (error, correct, total, pcorrect) = self.step( **set )
                  self._sweeping = 0
                  if self.crossValidationReportLayers != []:
                      (error, correct, total, pcorrect) = self.getError( *self.crossValidationReportLayers )
                  tssError += error
                  totalCorrect += correct
                  totalCount += total
                  sumMerge(totalPCorrect, pcorrect)
          self.learning = oldLearning
          self._cv = False
          return (tssError, totalCorrect, totalCount, totalPCorrect)
docs: sweepCrossValidation() will go through each of the crossvalidation input/targets.
          The crossValidationCorpus is a list of dictionaries of input/targets
          referenced by layername.
          Example: ({"input": [0.0, 0.1], "output": [1.0]}, {"input": [0.5, 0.9], "output": [0.0]})