class_docstr: Creates a criterion that measures the Categorical Cross Entropy between the
  ground truth (gt) and the prediction (pr).
  
  .. math:: L(gt, pr) = - gt \cdot \log(pr)
  
  Args:
      class_weights: Array (``np.array``) of class weights (``len(weights) = num_classes``).
      class_indexes: Optional integer or list of integers, classes to consider, if ``None`` all classes are used.
  
  Returns:
      A callable ``categorical_crossentropy`` instance. Can be used in ``model.compile(...)`` function
      or combined with other losses.
  
  Example:
  
  .. code:: python
  
      loss = CategoricalCELoss()
      model.compile('SGD', loss=loss)
class_docstr_tok: ["Creates","a","criterion","that","measures","the","Categorical","Cross","Entropy","between","the","ground","truth","(","gt",")","and","the","prediction","(","pr",")",".","..","math",":",":","L","(","gt",",","pr",")","=","-","gt","\\cdot","\\log","(","pr",")","Args",":","class_weights",":","Array","(","``","np.array","``",")","of","class","weights","(","``","len","(","weights",")","=","num_classes","``",")",".","class_indexes",":","Optional","integer","or","list","of","integers",",","classes","to","consider",",","if","``","None","``","all","classes","are","used",".","Returns",":","A","callable","``","categorical_crossentropy","``","instance",".","Can","be","used","in","``","model.compile","(","...",")","``","function","or","combined","with","other","losses",".","Example",":","..","code",":",":","python","loss","=","CategoricalCELoss","(",")","model.compile","(","'SGD","'",",","loss=loss",")"]
code: def __init__(self, class_weights=None, class_indexes=None):
      super().__init__(name="categorical_crossentropy")
      self.class_weights = (
          class_weights if class_weights is not None else 1
      )
      self.class_indexes = class_indexes
  
imports: from .base import Loss
  from .base import functional
label_desc: Use image node_id 1 to create a new CategoricalCELoss object from inherited base classes: Loss with example: obj = CategoricalCELoss(class_weights, class_indexes)