code: public DataSet featurize(DataSet input) {
          if (isGraph) {
              //trying to featurize for a computation graph
              if (origGraph.getNumInputArrays() > 1 || origGraph.getNumOutputArrays() > 1) {
                  throw new IllegalArgumentException(
                                  "Input or output size to a computation graph is greater than one. Requires use of a MultiDataSet.");
              } else {
                  if (input.getFeaturesMaskArray() != null) {
                      throw new IllegalArgumentException(
                                      "Currently cannot support featurizing datasets with feature masks");
                  }
                  MultiDataSet inbW = new MultiDataSet(new INDArray[] {input.getFeatures()},
                                  new INDArray[] {input.getLabels()}, null, new INDArray[] {input.getLabelsMaskArray()});
                  MultiDataSet ret = featurize(inbW);
                  return new DataSet(ret.getFeatures()[0], input.getLabels(), ret.getLabelsMaskArrays()[0],
                                  input.getLabelsMaskArray());
              }
          } else {
              if (input.getFeaturesMaskArray() != null)
                  throw new UnsupportedOperationException("Feature masks not supported with featurizing currently");
              return new DataSet(origMLN.feedForwardToLayer(frozenInputLayer + 1, input.getFeatures(), false)
                              .get(frozenInputLayer + 1), input.getLabels(), null, input.getLabelsMaskArray());
          }
      }
docs: During training frozen vertices/layers can be treated as "featurizing" the input
  The forward pass through these frozen layer/vertices can be done in advance and the dataset saved to disk to iterate
  quickly on the smaller unfrozen part of the model
  Currently does not support datasets with feature masks
  
  @param input multidataset to feed into the computation graph with frozen layer vertices
  @return a multidataset with input features that are the outputs of the frozen layer vertices and the original labels.