code: @Override
      public INDArray computeScoreForExamples(double fullNetRegTerm, LayerWorkspaceMgr workspaceMgr) {
          if (input == null || labels == null)
              throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());
          INDArray preOut = preOutput2d(false, workspaceMgr);
  
          // calculate the intra-class score component
          INDArray centers = params.get(CenterLossParamInitializer.CENTER_KEY);
          INDArray centersForExamples = labels.mmul(centers);
          INDArray intraClassScoreArray = input.sub(centersForExamples);
  
          // calculate the inter-class score component
          ILossFunction interClassLoss = layerConf().getLossFn();
          INDArray scoreArray = interClassLoss.computeScoreArray(getLabels2d(workspaceMgr, ArrayType.FF_WORKING_MEM), preOut, layerConf().getActivationFn(),
                          maskArray);
          scoreArray.addi(intraClassScoreArray.muli(layerConf().getLambda() / 2));
  
          if (fullNetRegTerm != 0.0) {
              scoreArray.addi(fullNetRegTerm);
          }
          return workspaceMgr.leverageTo(ArrayType.ACTIVATIONS, scoreArray);
      }
docs: Compute the score for each example individually, after labels and input have been set.
  
  @param fullNetRegTerm Regularization term for the entire network (or, 0.0 to not include regularization)
  @return A column INDArray of shape [numExamples,1], where entry i is the score of the ith example