code: def __call__(self, inputs, y_pred, y_true, is_val=False):
      top_k = y_pred.topk(self.top_k, 1)[1]
      true_k = y_true.view(len(y_true), 1).expand_as(top_k)
      self.correct_count += top_k.eq(true_k).float().sum().item()
      self.total_count += len(y_pred)
      accuracy = (
          100.0 * float(self.correct_count) / float(self.total_count)
      )
      return accuracy
  
imports: import torch
  from .utils import th_matrixcorr
  from .meters.averagemeter import AverageMeter
  from .callbacks import Callback
  from .losses import lovaszloss, hingeloss, dice_coeff
label_desc: Use image node_id 3 for calling the CategoricalAccuracy obj's underlying member method code with example usage: obj.__call__(inputs, y_pred, y_true, is_val) and returns: accuracy