code: 
  """simple docstring"""
  
  
  
  
  
  import copy
  
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  _a	 =							logging.get_logger(__name__)
  
  _a	 =							{
      'facebook/sam-vit-huge': 'https://huggingface.co/facebook/sam-vit-huge/resolve/main/config.json',
      'facebook/sam-vit-large': 'https://huggingface.co/facebook/sam-vit-large/resolve/main/config.json',
      'facebook/sam-vit-base': 'https://huggingface.co/facebook/sam-vit-base/resolve/main/config.json',
  }
  
  
  class A_			(A_   ):
  
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
  
    def __init__(	self       ,     lowercase_=256       ,     lowercase_=1024       ,     lowercase_=16       ,     lowercase_=16       ,     lowercase_=4       ,     lowercase_="gelu"       ,     lowercase_=1E-6       ,     **lowercase_       ,     ):
  
       """simple docstring"""
       super().__init__(**lowercase_						)
       UpperCAmelCase_      :      Union[str, Any]      =					hidden_size
       UpperCAmelCase_      :      Optional[Any]      =					image_size
       UpperCAmelCase_      :      Tuple      =					patch_size
       UpperCAmelCase_      :      List[str]      =					image_size // patch_size
       UpperCAmelCase_      :      Optional[Any]      =					mask_input_channels
       UpperCAmelCase_      :      str      =					num_point_embeddings
       UpperCAmelCase_      :      List[Any]      =					hidden_act
       UpperCAmelCase_      :      Union[str, Any]      =					layer_norm_eps
  
  
  
  
  class A_			(A_   ):
  
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
  
    def __init__(	self       ,     lowercase_=256       ,     lowercase_="relu"       ,     lowercase_=2048       ,     lowercase_=2       ,     lowercase_=8       ,     lowercase_=2       ,     lowercase_=3       ,     lowercase_=3       ,     lowercase_=256       ,     lowercase_=1E-6       ,     **lowercase_       ,     ):
  
       """simple docstring"""
       super().__init__(**lowercase_						)
       UpperCAmelCase_      :      List[Any]      =					hidden_size
       UpperCAmelCase_      :      Optional[int]      =					hidden_act
       UpperCAmelCase_      :      Union[str, Any]      =					mlp_dim
       UpperCAmelCase_      :      Optional[int]      =					num_hidden_layers
       UpperCAmelCase_      :      List[str]      =					num_attention_heads
       UpperCAmelCase_      :      Dict      =					attention_downsample_rate
       UpperCAmelCase_      :      Optional[Any]      =					num_multimask_outputs
       UpperCAmelCase_      :      Optional[Any]      =					iou_head_depth
       UpperCAmelCase_      :      Dict      =					iou_head_hidden_dim
       UpperCAmelCase_      :      List[str]      =					layer_norm_eps
  
  
  
  
  class A_			(A_   ):
  
  
  
  
    '''simple docstring'''
  
  
  
  
  
  
  
    def __init__(	self       ,     lowercase_=768       ,     lowercase_=256       ,     lowercase_=12       ,     lowercase_=12       ,     lowercase_=3       ,     lowercase_=1024       ,     lowercase_=16       ,     lowercase_="gelu"       ,     lowercase_=1E-0_6       ,     lowercase_=0.0       ,     lowercase_=1E-1_0       ,     lowercase_=True       ,     lowercase_=4.0       ,     lowercase_=True       ,     lowercase_=True       ,     lowercase_=14       ,     lowercase_=[2, 5, 8, 11]       ,     lowercase_=128       ,     lowercase_=None       ,     **lowercase_       ,     ):
  
       """simple docstring"""
       super().__init__(**lowercase_						)
  
       UpperCAmelCase_      :      Union[str, Any]      =					hidden_size
       UpperCAmelCase_      :      Optional[int]      =					output_channels
       UpperCAmelCase_      :      Dict      =					num_hidden_layers
       UpperCAmelCase_      :      str      =					num_attention_heads
       UpperCAmelCase_      :      Dict      =					num_channels
       UpperCAmelCase_      :      List[Any]      =					image_size
       UpperCAmelCase_      :      int      =					patch_size
       UpperCAmelCase_      :      Optional[Any]      =					hidden_act
       UpperCAmelCase_      :      Any      =					layer_norm_eps
       UpperCAmelCase_      :      Any      =					attention_dropout
       UpperCAmelCase_      :      Optional[int]      =					initializer_range
       UpperCAmelCase_      :      List[str]      =					qkv_bias
       UpperCAmelCase_      :      Optional[Any]      =					mlp_ratio
       UpperCAmelCase_      :      Optional[Any]      =					use_abs_pos
       UpperCAmelCase_      :      List[Any]      =					use_rel_pos
       UpperCAmelCase_      :      str      =					window_size
       UpperCAmelCase_      :      Tuple      =					global_attn_indexes
       UpperCAmelCase_      :      List[Any]      =					num_pos_feats
       UpperCAmelCase_      :      int      =					int(hidden_size * mlp_ratio						) if mlp_dim is None else mlp_dim
  
  
  
  
  class A_			(A_   ):
  
  
  
  
    '''simple docstring'''
    SCREAMING_SNAKE_CASE__    :		Optional[int]						  =	"""sam"""
    SCREAMING_SNAKE_CASE__    :		int						  =	True
  
  
  
  
  
  
  
    def __init__(	self       ,     lowercase_=None       ,     lowercase_=None       ,     lowercase_=None       ,     lowercase_=0.02       ,     **lowercase_       ,     ):
  
       """simple docstring"""
       super().__init__(**lowercase_						)
       UpperCAmelCase_      :      Optional[int]      =					vision_config if vision_config is not None else {}
       UpperCAmelCase_      :      Any      =					prompt_encoder_config if prompt_encoder_config is not None else {}
       UpperCAmelCase_      :      Optional[Any]      =					mask_decoder_config if mask_decoder_config is not None else {}
  
       if isinstance(lowercase_       ,     lowercase_						):
          UpperCAmelCase_      :      Dict      =					vision_config.to_dict()
       if isinstance(lowercase_       ,     lowercase_						):
          UpperCAmelCase_      :      List[str]      =					prompt_encoder_config.to_dict()
       if isinstance(lowercase_       ,     lowercase_						):
          UpperCAmelCase_      :      Optional[int]      =					mask_decoder_config.to_dict()
  
       UpperCAmelCase_      :      Union[str, Any]      =					SamVisionConfig(**lowercase_						)
       UpperCAmelCase_      :      Optional[Any]      =					SamPromptEncoderConfig(**lowercase_						)
       UpperCAmelCase_      :      List[Any]      =					SamMaskDecoderConfig(**lowercase_						)
       UpperCAmelCase_      :      Union[str, Any]      =					initializer_range
  
  
  
  
  
  
  
    def  UpperCamelCase__      (	self						):
  
       """simple docstring"""
       UpperCAmelCase_      :      List[Any]      =					copy.deepcopy(self.__dict__						)
       UpperCAmelCase_      :      int      =					self.vision_config.to_dict()
       UpperCAmelCase_      :      Optional[int]      =					self.prompt_encoder_config.to_dict()
       UpperCAmelCase_      :      List[Any]      =					self.mask_decoder_config.to_dict()
       UpperCAmelCase_      :      List[Any]      =					self.__class__.model_type
       return output
  
  
  
style_context: 
  """simple docstring"""
  
  
  
  
  
  def 			__a  (	__lowerCamelCase = 1000						):
     UpperCAmelCase_      :      List[Any]      =					0
     UpperCAmelCase_      :      List[str]      =					(n - 1) // 3
     total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
     UpperCAmelCase_      :      Any      =					(n - 1) // 5
     total += ((terms) * (10 + (terms - 1) * 5)) // 2
     UpperCAmelCase_      :      Optional[int]      =					(n - 1) // 15
     total -= ((terms) * (30 + (terms - 1) * 15)) // 2
     return total
  
  
  if __name__ == "__main__":
      print(f"""{solution() = }""")
  
  
  