class_docstr: Same as `loss_cls`, but flattens input and target.
code: def __call__(
      self,
      inp: Tensor | MutableSequence,  # Predictions from a `Learner`
      targ: Tensor | MutableSequence,  # Actual y label
      **kwargs,
  ) -> TensorBase:  # `loss_cls` calculated on `inp` and `targ`
      inp, targ = map(self._contiguous, (inp, targ))
      if self.floatify and targ.dtype != torch.float16:
          targ = targ.float()
      if targ.dtype in [torch.int8, torch.int16, torch.int32]:
          targ = targ.long()
      if self.flatten:
          inp = (
              inp.view(-1, inp.shape[-1])
              if self.is_2d
              else inp.view(-1)
          )
      return self.func.__call__(
          inp, targ.view(-1) if self.flatten else targ, **kwargs
      )
  
imports: from __future__ import annotations
  from .imports import *
  from .torch_imports import *
  from .torch_core import *
  from .layers import *
label_desc: Use image node_id 6 for calling the BaseLoss obj's underlying member method code with example usage: obj.__call__(inp, targ) and returns: self