code: @Override
      public double computeScore(double fullNetRegTerm, boolean training, LayerWorkspaceMgr workspaceMgr) {
          if (input == null || labels == null)
              throw new IllegalStateException("Cannot calculate score without input and labels " + layerId());
          this.fullNetworkRegularizationScore = fullNetRegTerm;
          INDArray preOut = input;
  
          ILossFunction lossFunction = layerConf().getLossFn();
  
          //double score = lossFunction.computeScore(getLabels2d(), preOut, layerConf().getActivationFunction(), maskArray, false);
          double score = lossFunction.computeScore(getLabels2d(), preOut, layerConf().getActivationFn(), maskArray,
                          false);
          score /= getInputMiniBatchSize();
          score += fullNetworkRegularizationScore;
  
          this.score = score;
          return score;
      }
docs: Compute score after labels and input have been set.
  @param fullNetRegTerm Regularization score term for the entire network
  @param training whether score should be calculated at train or test time (this affects things like application of
  dropout, etc)
  @return score (loss function)