class_docstr: Just a batchnorm.
class_docstr_tok: ["Just","a","batchnorm","."]
docstr: Forward function for feature maps before classifying each pixel with
  ``self.cls_seg`` fc.
  Args:
      inputs (list[Tensor]): List of multi-level img features.
  Returns:
      feats (Tensor): A tensor of shape (batch_size, self.channels,
          H, W) which is feature map for last layer of decoder head.
docstr_tok: ["Forward","function","for","feature","maps","before","classifying","each","pixel","with","``","self.cls_seg","``","fc",".","Args",":","inputs","(","list","[","Tensor","]",")",":","List","of","multi-level","img","features",".","Returns",":","feats","(","Tensor",")",":","A","tensor","of","shape","(","batch_size",",","self.channels",",","H",",","W",")","which","is","feature","map","for","last","layer","of","decoder","head","."]
code: def _forward_feature(self, inputs, img_metas=None, **kwargs):
      """Forward function for feature maps before classifying each pixel with
      ``self.cls_seg`` fc.
      Args:
          inputs (list[Tensor]): List of multi-level img features.
      Returns:
          feats (Tensor): A tensor of shape (batch_size, self.channels,
              H, W) which is feature map for last layer of decoder head.
      """
      # accept lists (for cls token)
      inputs = list(inputs)
      for i, x in enumerate(inputs):
          if len(x) == 2:
              x, cls_token = x[0], x[1]
              if len(x.shape) == 2:
                  x = x[:, :, None, None]
              cls_token = cls_token[:, :, None, None].expand_as(x)
              inputs[i] = torch.cat((x, cls_token), 1)
          else:
              x = x[0]
              if len(x.shape) == 2:
                  x = x[:, :, None, None]
              inputs[i] = x
      x = self._transform_inputs(inputs)
      # feats = self.bn(x)
      return x
  
file_path: dinov2/dinov2/eval/depth/models/decode_heads/linear_head.py
imports: import torch
  import torch.nn
  from ...ops import resize
  from ..builder import HEADS
  from .decode_head import DepthBaseDecodeHead
label_desc: Use image node_id 3 for calling the BNHead obj's underlying member method code with example usage: obj._forward_feature(inputs, img_metas) and returns: x