

"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__UpperCAmelCase			=					logging.get_logger(__name__)







class   __lowercase      (     UpperCamelCase_						,      UpperCamelCase_       ):
  snake_case_												=							"""maskformer-swin"""

  snake_case_												=							{
      """num_attention_heads""": """num_heads""",
      """num_hidden_layers""": """num_layers""",
  }

  def __init__(	self		:      str       ,A		:      List[Any]=224       ,A		:      Tuple=4       ,A		:      List[Any]=3       ,A		:      str=96       ,A		:      Dict=[2, 2, 6, 2]       ,A		:      Dict=[3, 6, 12, 24]       ,A		:      Union[str, Any]=7       ,A		:      str=4.0       ,A		:      Optional[int]=True       ,A		:      Any=0.0       ,A		:      Any=0.0       ,A		:      int=0.1       ,A		:      Optional[Any]="gelu"       ,A		:      Optional[Any]=False       ,A		:      List[Any]=0.0_2       ,A		:      Optional[int]=1e-5       ,A		:      Union[str, Any]=None       ,A		:      List[Any]=None       ,**A		:      Tuple       ,):






   '''simple docstring'''
   super().__init__(**a__     )

   UpperCAmelCase__       :	Optional[Any]        =       image_size
   UpperCAmelCase__       :	Dict        =       patch_size
   UpperCAmelCase__       :	Dict        =       num_channels
   UpperCAmelCase__       :	List[Any]        =       embed_dim
   UpperCAmelCase__       :	Optional[Any]        =       depths
   UpperCAmelCase__       :	Optional[int]        =       len(a__     )
   UpperCAmelCase__       :	List[Any]        =       num_heads
   UpperCAmelCase__       :	Union[str, Any]        =       window_size
   UpperCAmelCase__       :	Tuple        =       mlp_ratio
   UpperCAmelCase__       :	Tuple        =       qkv_bias
   UpperCAmelCase__       :	str        =       hidden_dropout_prob
   UpperCAmelCase__       :	Dict        =       attention_probs_dropout_prob
   UpperCAmelCase__       :	Optional[int]        =       drop_path_rate
   UpperCAmelCase__       :	Optional[int]        =       hidden_act
   UpperCAmelCase__       :	Optional[Any]        =       use_absolute_embeddings
   UpperCAmelCase__       :	List[Any]        =       layer_norm_eps
   UpperCAmelCase__       :	Tuple        =       initializer_range
   # we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
   # this indicates the channel dimension after the last stage of the model
   UpperCAmelCase__       :	Optional[Any]        =       int(embed_dim * 2 ** (len(a__     ) - 1)     )
   UpperCAmelCase__       :	Union[str, Any]        =       ["stem"] + [f"stage{idx}" for idx in range(1       ,len(a__     ) + 1     )]
   UpperCAmelCase__       :	List[str]        =       get_aligned_output_features_output_indices(
       out_features=a__       ,out_indices=a__       ,stage_names=self.stage_names     )







'''simple docstring'''

def        UpperCAmelCase_ (  lowerCamelCase_			):







 """simple docstring"""


 return number & 1 == 0


if __name__ == "__main__":
     import doctest

     doctest.testmod()





