class_docstr: Same as `loss_cls`, but flattens input and target.
code: def __init__(
      self,
      loss_cls,  # Uninitialized PyTorch-compatible loss
      *args,
      axis: int = -1,  # Class axis
      flatten: bool = True,  # Flatten `inp` and `targ` before calculating loss
      floatify: bool = False,  # Convert `targ` to `float`
      is_2d: bool = True,  # Whether `flatten` keeps one or two channels when applied
      **kwargs,
  ):
      store_attr("axis,flatten,floatify,is_2d")
      self.func = loss_cls(*args, **kwargs)
      functools.update_wrapper(self, self.func)
  
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 1 to create a new BaseLoss object  with example: obj = BaseLoss(loss_cls)