code: def raft_stereo_base(
      *,
      weights: Optional[Raft_Stereo_Base_Weights] = None,
      progress=True,
      **kwargs,
  ) -> RaftStereo:
      """RAFT-Stereo model from
      `RAFT-Stereo: Multilevel Recurrent Field Transforms for Stereo Matching <https://arxiv.org/abs/2109.07547>`_.
  
      Please see the example below for a tutorial on how to use this model.
  
      Args:
          weights(:class:`~torchvision.prototype.models.depth.stereo.Raft_Stereo_Base_Weights`, optional): The
              pretrained weights to use. See
              :class:`~torchvision.prototype.models.depth.stereo.Raft_Stereo_Base_Weights`
              below for more details, and possible values. By default, no
              pre-trained weights are used.
          progress (bool): If True, displays a progress bar of the download to stderr. Default is True.
          **kwargs: parameters passed to the ``torchvision.prototype.models.depth.stereo.raft_stereo.RaftStereo``
              base class. Please refer to the `source code
              <https://github.com/pytorch/vision/blob/main/torchvision/models/optical_flow/raft.py>`_
              for more details about this class.
  
      .. autoclass:: torchvision.prototype.models.depth.stereo.Raft_Stereo_Base_Weights
          :members:
      """
  
      weights = Raft_Stereo_Base_Weights.verify(weights)
  
      return _raft_stereo(
          weights=weights,
          progress=progress,
          shared_encoder_weight=False,
          # Feature encoder
          feature_encoder_layers=(64, 64, 96, 128, 256),
          feature_encoder_strides=(1, 1, 2, 2),
          feature_encoder_block=ResidualBlock,
          # Context encoder
          context_encoder_layers=(64, 64, 96, 128, 256),
          context_encoder_strides=(1, 1, 2, 2),
          context_encoder_out_with_blocks=[True, True, False],
          context_encoder_block=ResidualBlock,
          # Correlation block
          corr_num_levels=4,
          corr_radius=4,
          # Motion encoder
          motion_encoder_corr_layers=(64, 64),
          motion_encoder_flow_layers=(64, 64),
          motion_encoder_out_channels=128,
          # Update block
          update_block_hidden_dims=[128, 128, 128],
          # Flow head
          flow_head_hidden_size=256,
          # Mask predictor
          mask_predictor_hidden_size=256,
          use_mask_predictor=True,
          slow_fast=False,
          **kwargs,
      )
  
imports: from functools import partial
  from typing import Callable, List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  import torchvision.models.optical_flow.raft
  from torch import Tensor
  from torchvision.models._api import register_model, Weights, WeightsEnum
  from torchvision.models._utils import handle_legacy_interface
  from torchvision.models.optical_flow._utils import grid_sample, make_coords_grid, upsample_flow
  from torchvision.models.optical_flow.raft import FlowHead, MotionEncoder, ResidualBlock
  from torchvision.ops import Conv2dNormActivation
  from torchvision.prototype.transforms._presets import StereoMatching
  from torchvision.utils import _log_api_usage_once
label_desc: Use image node_id 3 for calling a global function with example usage: raft_stereo_base() and returns: _raft_stereo