docs: @Override
      public INDArray computeScoreForExamples(double fullNetRegTerm, LayerWorkspaceMgr workspaceMgr) {
          //For 3D CNN: need to sum up the score over each x/y/z location before returning
  
          if (input == null || labels == null)
              throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());
  
          INDArray input2d = ConvolutionUtils.reshape5dTo2d(layerConf().getDataFormat(), input, workspaceMgr, ArrayType.FF_WORKING_MEM);
          INDArray labels2d = ConvolutionUtils.reshape5dTo2d(layerConf().getDataFormat(), labels, workspaceMgr, ArrayType.FF_WORKING_MEM);
          INDArray maskReshaped = ConvolutionUtils.reshapeCnn3dMask(layerConf().getDataFormat(), maskArray, input, workspaceMgr, ArrayType.FF_WORKING_MEM);
  
          ILossFunction lossFunction = layerConf().getLossFn();
          INDArray scoreArray =
                  lossFunction.computeScoreArray(labels2d, input2d, layerConf().getActivationFn(), maskReshaped);
          //scoreArray: shape [minibatch*d*h*w, 1]
          //Reshape it to [minibatch, 1, d, h, w] then sum over x/y/z to give [minibatch, 1]
  
          val newShape = input.shape().clone();
          newShape[1] = 1;
  
          // FIXME
          int n = (int)input.size(0);
          int d, h, w, c;
          if(layerConf().getDataFormat() == Convolution3D.DataFormat.NDHWC){
              d = (int)input.size(1);
              h = (int)input.size(2);
              w = (int)input.size(3);
              c = (int)input.size(4);
          } else {
              d = (int)input.size(2);
              h = (int)input.size(3);
              w = (int)input.size(4);
              c = (int)input.size(1);
          }
          INDArray scoreArrayTs = ConvolutionUtils.reshape2dTo5d(layerConf().getDataFormat(), scoreArray, n, d, h, w, c, workspaceMgr, ArrayType.FF_WORKING_MEM);
          INDArray summedScores = scoreArrayTs.sum(1,2,3,4);
  
          if (fullNetRegTerm != 0.0) {
              summedScores.addi(fullNetRegTerm);
          }
  
          return workspaceMgr.leverageTo(ArrayType.ACTIVATIONS, summedScores);
      }