code: public Layer getOutputLayer(int outputLayerIdx) {
          if (outputLayerIdx >= numOutputArrays)
              throw new IllegalArgumentException("Invalid index: cannot get output layer " + outputLayerIdx
                      + ", total number of network outputs = " + numOutputArrays);
          return getLayer(configuration.getNetworkOutputs().get(outputLayerIdx));
      }
docs: Get the specified output layer, by index. The index of the output
  layer may be 0 to {@link #getNumOutputArrays()}-1