class_docstr: Just a batchnorm.
class_docstr_tok: ["Just","a","batchnorm","."]
docstr: Transform inputs for decoder.
  Args:
      inputs (list[Tensor]): List of multi-level img features.
  Returns:
      Tensor: The transformed inputs
docstr_tok: ["Transform","inputs","for","decoder",".","Args",":","inputs","(","list","[","Tensor","]",")",":","List","of","multi-level","img","features",".","Returns",":","Tensor",":","The","transformed","inputs"]
code: def _transform_inputs(self, inputs):
      """Transform inputs for decoder.
      Args:
          inputs (list[Tensor]): List of multi-level img features.
      Returns:
          Tensor: The transformed inputs
      """
  
      if self.input_transform == "resize_concat":
          # accept lists (for cls token)
          input_list = []
          for x in inputs:
              if isinstance(x, list):
                  input_list.extend(x)
              else:
                  input_list.append(x)
          inputs = input_list
          # an image descriptor can be a local descriptor with resolution 1x1
          for i, x in enumerate(inputs):
              if len(x.shape) == 2:
                  inputs[i] = x[:, :, None, None]
          # select indices
          inputs = [inputs[i] for i in self.in_index]
          # Resizing shenanigans
          # print("before", *(x.shape for x in inputs))
          if self.resize_factors is not None:
              assert len(self.resize_factors) == len(inputs), (
                  len(self.resize_factors),
                  len(inputs),
              )
              inputs = [
                  resize(
                      input=x,
                      scale_factor=f,
                      mode="bilinear" if f >= 1 else "area",
                  )
                  for x, f in zip(inputs, self.resize_factors)
              ]
              # print("after", *(x.shape for x in inputs))
          upsampled_inputs = [
              resize(
                  input=x,
                  size=inputs[0].shape[2:],
                  mode="bilinear",
                  align_corners=self.align_corners,
              )
              for x in inputs
          ]
          inputs = torch.cat(upsampled_inputs, dim=1)
      elif self.input_transform == "multiple_select":
          inputs = [inputs[i] for i in self.in_index]
      else:
          inputs = inputs[self.in_index]
  
      return inputs
  
file_path: dinov2/dinov2/eval/segmentation/models/decode_heads/linear_head.py
imports: import torch
  import torch.nn
  from mmseg.models.builder import HEADS
  from mmseg.models.decode_heads.decode_head import BaseDecodeHead
  from mmseg.ops import resize
label_desc: Use image node_id 3 for calling the BNHead obj's underlying member method code with example usage: obj._transform_inputs(inputs) and returns: inputs