class_docstr: Mask predictor to be used when upsampling the predicted disparity.
class_docstr_tok: ["Mask","predictor","to","be","used","when","upsampling","the","predicted","disparity","."]
code: def __init__(
      self,
      *,
      in_channels: int,
      hidden_size: int,
      out_channels: int,
      multiplier: float = 0.25,
  ):
      super(raft.MaskPredictor, self).__init__()
      self.convrelu = Conv2dNormActivation(
          in_channels, hidden_size, norm_layer=None, kernel_size=3
      )
      self.conv = nn.Conv2d(
          hidden_size, out_channels, kernel_size=1, padding=0
      )
      self.multiplier = multiplier
  
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 1 to create a new MaskPredictor object from inherited base classes: raft with example: obj = MaskPredictor()