code: public void pretrain(DataSetIterator iter, int numEpochs) {
          if (numInputArrays != 1) {
              throw new UnsupportedOperationException(
                      "Cannot train ComputationGraph network with  multiple inputs using a DataSetIterator");
          }
  
          pretrain(ComputationGraphUtil.toMultiDataSetIterator(iter), numEpochs);
      }
docs: Pretrain network with a single input and single output. DataSetIterators can only be used if the number of input
  arrays for the ComputationGraph is 1.<br>
  This method performs layerwise pretraining on all pre-trainable layers in the network (VAEs, Autoencoders, etc), for the specified
  number of epochs each. For example, if numEpochs=3, then layer 0 will be fit for 3 epochs, followed by layer 1
  for 3 epochs, and so on.<br>
  For networks with more than one input use {@link #pretrain(MultiDataSetIterator)}