class_docstr: .. note:: `bigdl.dllib.keras` is deprecated in 0.11.
  This will be removed in future releases.
class_docstr_tok: ["..","note",":",":","`","bigdl.dllib.keras","`","is","deprecated","in","0.11",".","This","will","be","removed","in","future","releases","."]
code: def __convert_criterion(self, criterion):
      criterion = criterion.lower()
      if criterion == "categorical_crossentropy":
          return CategoricalCrossEntropy()
      elif criterion == "mse" or criterion == "mean_squared_error":
          return MSECriterion()
      elif criterion == "binary_crossentropy":
          return BCECriterion()
      elif criterion == "mae" or criterion == "mean_absolute_error":
          return AbsCriterion()
      elif criterion == "hinge":
          return MarginCriterion()
      elif (
          criterion == "mean_absolute_percentage_error"
          or criterion == "mape"
      ):
          return MeanAbsolutePercentageCriterion()
      elif (
          criterion == "mean_squared_logarithmic_error"
          or criterion == "msle"
      ):
          return MeanSquaredLogarithmicCriterion()
      elif criterion == "squared_hinge":
          return MarginCriterion(squared=True)
      elif criterion == "sparse_categorical_crossentropy":
          return ClassNLLCriterion(logProbAsInput=False)
      elif (
          criterion == "kullback_leibler_divergence"
          or criterion == "kld"
      ):
          return KullbackLeiblerDivergenceCriterion()
      elif criterion == "poisson":
          return PoissonCriterion()
      elif criterion == "cosine_proximity" or criterion == "cosine":
          return CosineProximityCriterion()
      else:
          invalidInputError(False, "Unsupported loss: %s" % criterion)
  
imports: from bigdl.dllib.nn.keras.layers.layer import KerasLayer
  from bigdl.dllib.optim.optimizer import *
  from bigdl.dllib.nn.criterion import *
  from bigdl.dllib.utils.log4Error import *
  import multiprocessing
  import warnings
  from bigdl.dllib.nn.layer import SharedStaticUtils, Container
label_desc: Use image node_id 2 for calling the KerasModel obj's underlying member method code with example usage: obj.__convert_criterion(criterion) and returns: CategoricalCrossEntropy, MSECriterion, BCECriterion, AbsCriterion, MarginCriterion, MeanAbsolutePercentageCriterion, MeanSquaredLogarithmicCriterion, MarginCriterion, ClassNLLCriterion, KullbackLeiblerDivergenceCriterion, PoissonCriterion, CosineProximityCriterion