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: Encode images with backbone and decode into a depth estimation
  map of the same size as input.
docstr_tok: ["Encode","images","with","backbone","and","decode","into","a","depth","estimation","map","of","the","same","size","as","input","."]
code: def encode_decode(self, img, img_metas, rescale=True, size=None):
      """Encode images with backbone and decode into a depth estimation
      map of the same size as input."""
      x = self.extract_feat(img)
      out = self._decode_head_forward_test(x, img_metas)
      # crop the pred depth to the certain range.
      out = torch.clamp(
          out,
          min=self.decode_head.min_depth,
          max=self.decode_head.max_depth,
      )
      if rescale:
          if size is None:
              if img_metas is not None:
                  size = img_metas[0]["ori_shape"][:2]
              else:
                  size = img.shape[2:]
          out = resize(
              input=out,
              size=size,
              mode="bilinear",
              align_corners=self.align_corners,
          )
      return out
  
imports: from collections import OrderedDict
  import torch
  import torch.nn
  import torch.nn.functional
  from .ops import resize
label_desc: Use image node_id 3 for calling the DepthEncoderDecoder obj's underlying member method code with example usage: obj.encode_decode(img, img_metas, rescale, size) and returns: out