class_docstr: This is the configuration class to store the configuration of a [`SamMaskDecoder`]. It is used to instantiate a SAM
  mask decoder to the specified arguments, defining the model architecture. Instantiating a configuration defaults
  will yield a similar configuration to that of the SAM-vit-h
  [facebook/sam-vit-huge](https://huggingface.co/facebook/sam-vit-huge) architecture.
  
  Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
  documentation from [`PretrainedConfig`] for more information.
  
  Args:
      hidden_size (`int`, *optional*, defaults to 256):
          Dimensionality of the hidden states.
      hidden_act (`str`, *optional*, defaults to `"relu"`):
          The non-linear activation function used inside the `SamMaskDecoder` module.
      mlp_dim (`int`, *optional*, defaults to 2048):
          Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
      num_hidden_layers (`int`, *optional*, defaults to 2):
          Number of hidden layers in the Transformer encoder.
      num_attention_heads (`int`, *optional*, defaults to 8):
          Number of attention heads for each attention layer in the Transformer encoder.
      attention_downsample_rate (`int`, *optional*, defaults to 2):
          The downsampling rate of the attention layer.
      num_multimask_outputs (`int`, *optional*, defaults to 3):
          The number of outputs from the `SamMaskDecoder` module. In the Segment Anything paper, this is set to 3.
      iou_head_depth (`int`, *optional*, defaults to 3):
          The number of layers in the IoU head module.
      iou_head_hidden_dim (`int`, *optional*, defaults to 256):
          The dimensionality of the hidden states in the IoU head module.
      layer_norm_eps (`float`, *optional*, defaults to 1e-06):
          The epsilon used by the layer normalization layers.
class_docstr_tok: ["This","is","the","configuration","class","to","store","the","configuration","of","a","[","`","SamMaskDecoder","`","]",".","It","is","used","to","instantiate","a","SAM","mask","decoder","to","the","specified","arguments",",","defining","the","model","architecture",".","Instantiating","a","configuration","defaults","will","yield","a","similar","configuration","to","that","of","the","SAM-vit-h","[","facebook\/sam-vit-huge","]","(","https",":","\/\/huggingface.co\/facebook\/sam-vit-huge",")","architecture",".","Configuration","objects","inherit","from","[","`","PretrainedConfig","`","]","and","can","be","used","to","control","the","model","outputs",".","Read","the","documentation","from","[","`","PretrainedConfig","`","]","for","more","information",".","Args",":","hidden_size","(","`","int","`",",","*","optional","*",",","defaults","to","256",")",":","Dimensionality","of","the","hidden","states",".","hidden_act","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","relu","''","`",")",":","The","non-linear","activation","function","used","inside","the","`","SamMaskDecoder","`","module",".","mlp_dim","(","`","int","`",",","*","optional","*",",","defaults","to","2048",")",":","Dimensionality","of","the","``","intermediate","''","(","i.e.",",","feed-forward",")","layer","in","the","Transformer","encoder",".","num_hidden_layers","(","`","int","`",",","*","optional","*",",","defaults","to","2",")",":","Number","of","hidden","layers","in","the","Transformer","encoder",".","num_attention_heads","(","`","int","`",",","*","optional","*",",","defaults","to","8",")",":","Number","of","attention","heads","for","each","attention","layer","in","the","Transformer","encoder",".","attention_downsample_rate","(","`","int","`",",","*","optional","*",",","defaults","to","2",")",":","The","downsampling","rate","of","the","attention","layer",".","num_multimask_outputs","(","`","int","`",",","*","optional","*",",","defaults","to","3",")",":","The","number","of","outputs","from","the","`","SamMaskDecoder","`","module",".","In","the","Segment","Anything","paper",",","this","is","set","to","3.","iou_head_depth","(","`","int","`",",","*","optional","*",",","defaults","to","3",")",":","The","number","of","layers","in","the","IoU","head","module",".","iou_head_hidden_dim","(","`","int","`",",","*","optional","*",",","defaults","to","256",")",":","The","dimensionality","of","the","hidden","states","in","the","IoU","head","module",".","layer_norm_eps","(","`","float","`",",","*","optional","*",",","defaults","to","1e-06",")",":","The","epsilon","used","by","the","layer","normalization","layers","."]
code: def __init__(
      self,
      hidden_size=256,
      hidden_act="relu",
      mlp_dim=2048,
      num_hidden_layers=2,
      num_attention_heads=8,
      attention_downsample_rate=2,
      num_multimask_outputs=3,
      iou_head_depth=3,
      iou_head_hidden_dim=256,
      layer_norm_eps=1e-6,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.hidden_size = hidden_size
      self.hidden_act = hidden_act
      self.mlp_dim = mlp_dim
      self.num_hidden_layers = num_hidden_layers
      self.num_attention_heads = num_attention_heads
      self.attention_downsample_rate = attention_downsample_rate
      self.num_multimask_outputs = num_multimask_outputs
      self.iou_head_depth = iou_head_depth
      self.iou_head_hidden_dim = iou_head_hidden_dim
      self.layer_norm_eps = layer_norm_eps
  
file_path: transformers/src/transformers/models/sam/configuration_sam.py
imports: from ...configuration_utils import PretrainedConfig
  from ...utils import logging
label_desc: Use image node_id 1 to create a new SamMaskDecoderConfig object from inherited base classes: PretrainedConfig with example: obj = SamMaskDecoderConfig(hidden_size, hidden_act, mlp_dim, num_hidden_layers, num_attention_heads, attention_downsample_rate, num_multimask_outputs, iou_head_depth, iou_head_hidden_dim, layer_norm_eps)