docs: public int layerInputSize(int layer) {
          if (layer < 0 || layer > layers.length) {
              throw new IllegalArgumentException("Invalid layer index: " + layer + ". Layer index must be between 0 and "
                      + (layers.length - 1) + " inclusive");
          }
          return layerInputSize(layers[layer].conf().getLayer().getLayerName());
      }