code: public MultiDataSet featurize(MultiDataSet input) {
          if (!isGraph) {
              throw new IllegalArgumentException("Cannot use multidatasets with MultiLayerNetworks.");
          }
          INDArray[] labels = input.getLabels();
          INDArray[] features = input.getFeatures();
          if (input.getFeaturesMaskArrays() != null) {
              throw new IllegalArgumentException("Currently cannot support featurizing datasets with feature masks");
          }
          INDArray[] featureMasks = null;
          INDArray[] labelMasks = input.getLabelsMaskArrays();
  
          INDArray[] featuresNow = new INDArray[graphInputs.size()];
          Map<String, INDArray> activationsNow = origGraph.feedForward(features, false);
          for (int i = 0; i < graphInputs.size(); i++) {
              String anInput = graphInputs.get(i);
              if (origGraph.getVertex(anInput).isInputVertex()) {
                  //was an original input to the graph
                  int inputIndex = origGraph.getConfiguration().getNetworkInputs().indexOf(anInput);
                  featuresNow[i] = origGraph.getInput(inputIndex);
              } else {
                  //needs to be grabbed from the internal activations
                  featuresNow[i] = activationsNow.get(anInput);
              }
          }
  
          return new MultiDataSet(featuresNow, labels, featureMasks, labelMasks);
      }
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.