class_docstr: Base class for BaseDecodeHead.
  
  Args:
      in_channels (List): Input channels.
      channels (int): Channels after modules, before conv_depth.
      conv_layer (nn.Module): Conv layers. Default: None.
      act_layer (nn.Module): Activation layers. Default: nn.ReLU.
      loss_decode (dict): Config of decode loss.
          Default: ().
      sampler (dict|None): The config of depth map sampler.
          Default: None.
      align_corners (bool): align_corners argument of F.interpolate.
          Default: False.
      min_depth (int): Min depth in dataset setting.
          Default: 1e-3.
      max_depth (int): Max depth in dataset setting.
          Default: None.
      norm_layer (dict|None): Norm layers.
          Default: None.
      classify (bool): Whether predict depth in a cls.-reg. manner.
          Default: False.
      n_bins (int): The number of bins used in cls. step.
          Default: 256.
      bins_strategy (str): The discrete strategy used in cls. step.
          Default: 'UD'.
      norm_strategy (str): The norm strategy on cls. probability
          distribution. Default: 'linear'
      scale_up (str): Whether predict depth in a scale-up manner.
          Default: False.
docstr: Compute depth loss.
docstr_tok: ["Compute","depth","loss","."]
code: def losses(self, depth_pred, depth_gt):
      """Compute depth loss."""
      loss = dict()
      depth_pred = resize(
          input=depth_pred,
          size=depth_gt.shape[2:],
          mode="bilinear",
          align_corners=self.align_corners,
          warning=False,
      )
      if not isinstance(self.loss_decode, nn.ModuleList):
          losses_decode = [self.loss_decode]
      else:
          losses_decode = self.loss_decode
      for loss_decode in losses_decode:
          if loss_decode.loss_name not in loss:
              loss[loss_decode.loss_name] = loss_decode(
                  depth_pred, depth_gt
              )
          else:
              loss[loss_decode.loss_name] += loss_decode(
                  depth_pred, depth_gt
              )
      return loss
  
imports: import copy
  from functools import partial
  import math
  import warnings
  import torch
  import torch.nn
  from .ops import resize
label_desc: Use image node_id 6 for calling the DepthBaseDecodeHead obj's underlying member method code with example usage: obj.losses(depth_pred, depth_gt) and returns: loss