docs: private void initHelperGraph() {
  
          int[] backPropOrder = origGraph.topologicalSortOrder().clone();
          ArrayUtils.reverse(backPropOrder);
  
          Set<String> allFrozen = new HashSet<>();
          if (applyFrozen) {
              Collections.addAll(allFrozen, frozenOutputAt);
          }
          for (int i = 0; i < backPropOrder.length; i++) {
              org.deeplearning4j.nn.graph.vertex.GraphVertex gv = origGraph.getVertices()[backPropOrder[i]];
              if (applyFrozen && allFrozen.contains(gv.getVertexName())) {
                  if (gv.hasLayer()) {
                      //Need to freeze this layer
                      org.deeplearning4j.nn.api.Layer l = gv.getLayer();
                      gv.setLayerAsFrozen();
  
                      //We also need to place the layer in the CompGraph Layer[] (replacing the old one)
                      //This could no doubt be done more efficiently
                      org.deeplearning4j.nn.api.Layer[] layers = origGraph.getLayers();
                      for (int j = 0; j < layers.length; j++) {
                          if (layers[j] == l) {
                              layers[j] = gv.getLayer(); //Place the new frozen layer to replace the original layer
                              break;
                          }
                      }
                  }
  
                  //Also: mark any inputs as to be frozen also
                  VertexIndices[] inputs = gv.getInputVertices();
                  if (inputs != null && inputs.length > 0) {
                      for (int j = 0; j < inputs.length; j++) {
                          int inputVertexIdx = inputs[j].getVertexIndex();
                          String alsoFreeze = origGraph.getVertices()[inputVertexIdx].getVertexName();
                          allFrozen.add(alsoFreeze);
                      }
                  }
              } else {
                  if (gv.hasLayer()) {
                      if (gv.getLayer() instanceof FrozenLayer) {
                          allFrozen.add(gv.getVertexName());
                          //also need to add parents to list of allFrozen
                          VertexIndices[] inputs = gv.getInputVertices();
                          if (inputs != null && inputs.length > 0) {
                              for (int j = 0; j < inputs.length; j++) {
                                  int inputVertexIdx = inputs[j].getVertexIndex();
                                  String alsoFrozen = origGraph.getVertices()[inputVertexIdx].getVertexName();
                                  allFrozen.add(alsoFrozen);
                              }
                          }
                      }
                  }
              }
          }
          for (int i = 0; i < backPropOrder.length; i++) {
              org.deeplearning4j.nn.graph.vertex.GraphVertex gv = origGraph.getVertices()[backPropOrder[i]];
              String gvName = gv.getVertexName();
              //is it an unfrozen vertex that has an input vertex that is frozen?
              if (!allFrozen.contains(gvName) && !gv.isInputVertex()) {
                  VertexIndices[] inputs = gv.getInputVertices();
                  for (int j = 0; j < inputs.length; j++) {
                      int inputVertexIdx = inputs[j].getVertexIndex();
                      String inputVertex = origGraph.getVertices()[inputVertexIdx].getVertexName();
                      if (allFrozen.contains(inputVertex)) {
                          frozenInputVertices.add(inputVertex);
                      }
                  }
              }
          }
  
          TransferLearning.GraphBuilder builder = new TransferLearning.GraphBuilder(origGraph);
          for (String toRemove : allFrozen) {
              if (frozenInputVertices.contains(toRemove)) {
                  builder.removeVertexKeepConnections(toRemove);
              } else {
                  builder.removeVertexAndConnections(toRemove);
              }
          }
  
          Set<String> frozenInputVerticesSorted = new HashSet<>();
          frozenInputVerticesSorted.addAll(origGraph.getConfiguration().getNetworkInputs());
          frozenInputVerticesSorted.removeAll(allFrozen);
          //remove input vertices - just to add back in a predictable order
          for (String existingInput : frozenInputVerticesSorted) {
              builder.removeVertexKeepConnections(existingInput);
          }
          frozenInputVerticesSorted.addAll(frozenInputVertices);
          //Sort all inputs to the computation graph - in order to have a predictable order
          graphInputs = new ArrayList(frozenInputVerticesSorted);
          Collections.sort(graphInputs);
          for (String asInput : frozenInputVerticesSorted) {
              //add back in the right order
              builder.addInputs(asInput);
          }
          unFrozenSubsetGraph = builder.build();
          copyOrigParamsToSubsetGraph();
          //unFrozenSubsetGraph.setListeners(origGraph.getListeners());
  
          if (frozenInputVertices.isEmpty()) {
              throw new IllegalArgumentException("No frozen layers found");
          }
  
      }