docs: public static ComputationGraphConfiguration.GraphBuilder appendGraph(
                      ComputationGraphConfiguration.GraphBuilder graph, String moduleLayerName, int inputSize,
                      int[] kernelSize, int[] kernelStride, int[] outputSize, int[] reduceSize,
                      SubsamplingLayer.PoolingType poolingType, int pNorm, int poolSize, int poolStride,
                      Activation transferFunction, String inputLayer) {
          // 1x1 reduce -> nxn conv
          for (int i = 0; i < kernelSize.length; i++) {
              graph.addLayer(getModuleName(moduleLayerName) + "-cnn1-" + i, conv1x1(inputSize, reduceSize[i], 0.2),
                              inputLayer);
              graph.addLayer(getModuleName(moduleLayerName) + "-batch1-" + i, batchNorm(reduceSize[i], reduceSize[i]),
                              getModuleName(moduleLayerName) + "-cnn1-" + i);
              graph.addLayer(getModuleName(moduleLayerName) + "-transfer1-" + i,
                              new ActivationLayer.Builder().activation(transferFunction).build(),
                              getModuleName(moduleLayerName) + "-batch1-" + i);
              graph.addLayer(getModuleName(moduleLayerName) + "-reduce1-" + i,
                              convNxN(reduceSize[i], outputSize[i], kernelSize[i], kernelStride[i], true),
                              getModuleName(moduleLayerName) + "-transfer1-" + i);
              graph.addLayer(getModuleName(moduleLayerName) + "-batch2-" + i, batchNorm(outputSize[i], outputSize[i]),
                              getModuleName(moduleLayerName) + "-reduce1-" + i);
              graph.addLayer(getModuleName(moduleLayerName) + "-transfer2-" + i,
                              new ActivationLayer.Builder().activation(transferFunction).build(),
                              getModuleName(moduleLayerName) + "-batch2-" + i);
          }
  
          // pool -> 1x1 conv
          int i = kernelSize.length;
          try {
              int checkIndex = reduceSize[i];
              switch (poolingType) {
                  case AVG:
                      graph.addLayer(getModuleName(moduleLayerName) + "-pool1", avgPoolNxN(poolSize, poolStride),
                                      inputLayer);
                      break;
                  case MAX:
                      graph.addLayer(getModuleName(moduleLayerName) + "-pool1", maxPoolNxN(poolSize, poolStride),
                                      inputLayer);
                      break;
                  case PNORM:
                      if (pNorm <= 0)
                          throw new IllegalArgumentException("p-norm must be greater than zero.");
                      graph.addLayer(getModuleName(moduleLayerName) + "-pool1", pNormNxN(pNorm, poolSize, poolStride),
                                      inputLayer);
                      break;
                  default:
                      throw new IllegalStateException(
                                      "You must specify a valid pooling type of avg or max for Inception module.");
              }
              graph.addLayer(getModuleName(moduleLayerName) + "-cnn2", convNxNreduce(inputSize, reduceSize[i], 1),
                              getModuleName(moduleLayerName) + "-pool1");
              graph.addLayer(getModuleName(moduleLayerName) + "-batch3", batchNorm(reduceSize[i], reduceSize[i]),
                              getModuleName(moduleLayerName) + "-cnn2");
              graph.addLayer(getModuleName(moduleLayerName) + "-transfer3",
                              new ActivationLayer.Builder().activation(transferFunction).build(),
                              getModuleName(moduleLayerName) + "-batch3");
          } catch (IndexOutOfBoundsException e) {
          }
          i++;
  
          // reduce
          try {
              graph.addLayer(getModuleName(moduleLayerName) + "-reduce2", convNxNreduce(inputSize, reduceSize[i], 1),
                              inputLayer);
              graph.addLayer(getModuleName(moduleLayerName) + "-batch4", batchNorm(reduceSize[i], reduceSize[i]),
                              getModuleName(moduleLayerName) + "-reduce2");
              graph.addLayer(getModuleName(moduleLayerName) + "-transfer4",
                              new ActivationLayer.Builder().activation(transferFunction).build(),
                              getModuleName(moduleLayerName) + "-batch4");
          } catch (IndexOutOfBoundsException e) {
          }
  
          // TODO: there's a better way to do this
          if (kernelSize.length == 1 && reduceSize.length == 3) {
              graph.addVertex(getModuleName(moduleLayerName), new MergeVertex(),
                              getModuleName(moduleLayerName) + "-transfer2-0",
                              getModuleName(moduleLayerName) + "-transfer3",
                              getModuleName(moduleLayerName) + "-transfer4");
          } else if (kernelSize.length == 2 && reduceSize.length == 2) {
              graph.addVertex(getModuleName(moduleLayerName), new MergeVertex(),
                              getModuleName(moduleLayerName) + "-transfer2-0",
                              getModuleName(moduleLayerName) + "-transfer2-1");
          } else if (kernelSize.length == 2 && reduceSize.length == 3) {
              graph.addVertex(getModuleName(moduleLayerName), new MergeVertex(),
                              getModuleName(moduleLayerName) + "-transfer2-0",
                              getModuleName(moduleLayerName) + "-transfer2-1",
                              getModuleName(moduleLayerName) + "-transfer3");
          } else if (kernelSize.length == 2 && reduceSize.length == 4) {
              graph.addVertex(getModuleName(moduleLayerName), new MergeVertex(),
                              getModuleName(moduleLayerName) + "-transfer2-0",
                              getModuleName(moduleLayerName) + "-transfer2-1",
                              getModuleName(moduleLayerName) + "-transfer3",
                              getModuleName(moduleLayerName) + "-transfer4");
          } else
              throw new IllegalStateException(
                              "Only kernel of shape 1 or 2 and a reduce shape between 2 and 4 is supported.");
  
          return graph;
      }