class_docstr: Creates a criterion that measures the Categorical Focal Loss between the
  ground truth (gt) and the prediction (pr).
  
  .. math:: L(gt, pr) = - gt \cdot \alpha \cdot (1 - pr)^\gamma \cdot \log(pr)
  
  Args:
      alpha: Float or integer, the same as weighting factor in balanced cross entropy, default 0.25.
      gamma: Float or integer, focusing parameter for modulating factor (1 - p), default 2.0.
      class_indexes: Optional integer or list of integers, classes to consider, if ``None`` all classes are used.
  
  Returns:
      A callable ``categorical_focal_loss`` instance. Can be used in ``model.compile(...)`` function
      or combined with other losses.
  
  Example:
  
      .. code:: python
  
          loss = CategoricalFocalLoss()
          model.compile('SGD', loss=loss)
class_docstr_tok: ["Creates","a","criterion","that","measures","the","Categorical","Focal","Loss","between","the","ground","truth","(","gt",")","and","the","prediction","(","pr",")",".","..","math",":",":","L","(","gt",",","pr",")","=","-","gt","\\cdot","\\alpha","\\cdot","(","1","-","pr",")","^\\gamma","\\cdot","\\log","(","pr",")","Args",":","alpha",":","Float","or","integer",",","the","same","as","weighting","factor","in","balanced","cross","entropy",",","default","0.25.","gamma",":","Float","or","integer",",","focusing","parameter","for","modulating","factor","(","1","-","p",")",",","default","2.0.","class_indexes",":","Optional","integer","or","list","of","integers",",","classes","to","consider",",","if","``","None","``","all","classes","are","used",".","Returns",":","A","callable","``","categorical_focal_loss","``","instance",".","Can","be","used","in","``","model.compile","(","...",")","``","function","or","combined","with","other","losses",".","Example",":","..","code",":",":","python","loss","=","CategoricalFocalLoss","(",")","model.compile","(","'SGD","'",",","loss=loss",")"]
code: def __call__(self, gt, pr):
      return F.categorical_focal_loss(
          gt,
          pr,
          alpha=self.alpha,
          gamma=self.gamma,
          class_indexes=self.class_indexes,
          **self.submodules,
      )
  
imports: from .base import Loss
  from .base import functional
label_desc: Use image node_id 2 for calling the CategoricalFocalLoss obj's underlying member method code with example usage: obj.__call__(gt, pr) and returns: F