code: public void fit(DataSet dataSet) {
          if (numInputArrays != 1 || numOutputArrays != 1)
              throw new UnsupportedOperationException("Cannot train ComputationGraph network with "
                      + " multiple inputs or outputs using a DataSet");
  
          boolean hasMaskArrays = dataSet.hasMaskArrays();
          if (hasMaskArrays) {
              INDArray[] fMask = (dataSet.getFeaturesMaskArray() != null ? new INDArray[]{dataSet.getFeaturesMaskArray()}
                      : null);
              INDArray[] lMask = (dataSet.getLabelsMaskArray() != null ? new INDArray[]{dataSet.getLabelsMaskArray()}
                      : null);
              fit(new INDArray[]{dataSet.getFeatures()}, new INDArray[]{dataSet.getLabels()}, fMask, lMask);
          } else {
              fit(new INDArray[]{dataSet.getFeatures()}, new INDArray[]{dataSet.getLabels()});
          }
  
          if (hasMaskArrays)
              clearLayerMaskArrays();
  
          clearLayersStates();
      }
docs: Fit the ComputationGraph using a DataSet.
  Note that this method can only be used with ComputationGraphs with 1 input and 1 output.
  For networks with more than one input or output, use {@link #fit(MultiDataSetIterator)}