docs: public static void validateOutputLayer(String layerName, Layer layer){
          IActivation activation;
          ILossFunction loss;
          long nOut;
          boolean isLossLayer = false;
          if (layer instanceof BaseOutputLayer && !(layer instanceof OCNNOutputLayer)) {
              activation = ((BaseOutputLayer) layer).getActivationFn();
              loss = ((BaseOutputLayer) layer).getLossFn();
              nOut = ((BaseOutputLayer) layer).getNOut();
          } else if (layer instanceof LossLayer) {
              activation = ((LossLayer) layer).getActivationFn();
              loss = ((LossLayer) layer).getLossFn();
              nOut = ((LossLayer) layer).getNOut();
              isLossLayer = true;
          } else if (layer instanceof RnnLossLayer) {
              activation = ((RnnLossLayer) layer).getActivationFn();
              loss = ((RnnLossLayer) layer).getLossFn();
              nOut = ((RnnLossLayer) layer).getNOut();
              isLossLayer = true;
          } else if (layer instanceof CnnLossLayer) {
              activation = ((CnnLossLayer) layer).getActivationFn();
              loss = ((CnnLossLayer) layer).getLossFn();
              nOut = ((CnnLossLayer) layer).getNOut();
              isLossLayer = true;
          } else {
              //Not an output layer
              return;
          }
          OutputLayerUtil.validateOutputLayerConfiguration(layerName, nOut, isLossLayer, activation, loss);
      }