class_docstr: Encoder Decoder depther.
  
  EncoderDecoder typically consists of backbone and decode_head.
class_docstr_tok: ["Encoder","Decoder","depther",".","EncoderDecoder","typically","consists","of","backbone","and","decode_head","."]
docstr: Forward function for training.
  
  Args:
      img (Tensor): Input images.
      img_metas (list[dict]): List of image info dict where each dict
          has: 'img_shape', 'scale_factor', 'flip', and may also contain
          'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'.
          For details on the values of these keys see
          `depth/datasets/pipelines/formatting.py:Collect`.
      depth_gt (Tensor): Depth gt
          used if the architecture supports depth estimation task.
  
  Returns:
      dict[str, Tensor]: a dictionary of loss components
docstr_tok: ["Forward","function","for","training",".","Args",":","img","(","Tensor",")",":","Input","images",".","img_metas","(","list","[","dict","]",")",":","List","of","image","info","dict","where","each","dict","has",":","'img_shape","'",",","'scale_factor","'",",","'flip","'",",","and","may","also","contain","'filename","'",",","'ori_shape","'",",","'pad_shape","'",",","and","'img_norm_cfg","'",".","For","details","on","the","values","of","these","keys","see","`","depth\/datasets\/pipelines\/formatting.py",":","Collect","`",".","depth_gt","(","Tensor",")",":","Depth","gt","used","if","the","architecture","supports","depth","estimation","task",".","Returns",":","dict","[","str",",","Tensor","]",":","a","dictionary","of","loss","components"]
code: def forward_train(self, img, img_metas, depth_gt, **kwargs):
      """Forward function for training.
  
      Args:
          img (Tensor): Input images.
          img_metas (list[dict]): List of image info dict where each dict
              has: 'img_shape', 'scale_factor', 'flip', and may also contain
              'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'.
              For details on the values of these keys see
              `depth/datasets/pipelines/formatting.py:Collect`.
          depth_gt (Tensor): Depth gt
              used if the architecture supports depth estimation task.
  
      Returns:
          dict[str, Tensor]: a dictionary of loss components
      """
  
      x = self.extract_feat(img)
  
      losses = dict()
  
      # the last of x saves the info from neck
      loss_decode = self._decode_head_forward_train(
          img, x, img_metas, depth_gt, **kwargs
      )
  
      losses.update(loss_decode)
  
      return losses
  
imports: from collections import OrderedDict
  import torch
  import torch.nn
  import torch.nn.functional
  from .ops import resize
label_desc: Use image node_id 7 for calling the DepthEncoderDecoder obj's underlying member method code with example usage: obj.forward_train(img, img_metas, depth_gt) and returns: losses