code: public SDVariable l2Loss(String name, @NonNull SDVariable var) {
          validateNumerical("l2 loss", var);
          SDVariable result = f().lossL2(var);
          result = updateVariableNameAndReference(result, name);
          result.markAsLoss();
          return result;
      }
docs: L2 loss: 1/2 * sum(x^2)
  
  @param name Name of the output variable
  @param var  Variable to calculate L2 loss of
  @return L2 loss