


'''simple docstring'''


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


__magic_name__			=      logging.get_logger(__name__)

__magic_name__			=      {
    "google/bit-50": "https://huggingface.co/google/bit-50/resolve/main/config.json",
}



class 	__lowerCAmelCase		(							UpperCAmelCase_  , UpperCAmelCase_    ):


  '''simple docstring'''







  a_  					=							"""bit"""
  a_  					=							["""preactivation""", """bottleneck"""]
  a_  					=							["""SAME""", """VALID"""]






  def __init__(							self :       List[str]	,_a :       int=3	,_a :       List[str]=64	,_a :       Optional[int]=[256, 512, 1024, 2048]	,_a :       Optional[int]=[3, 4, 6, 3]	,_a :       int="preactivation"	,_a :       Union[str, Any]="relu"	,_a :       List[Any]=None	,_a :       Tuple=32	,_a :       Optional[int]=0.0	,_a :       Union[str, Any]=False	,_a :       Dict=32	,_a :       Union[str, Any]=1	,_a :       List[Any]=None	,_a :       Any=None	,**_a :       str	,):

        '''simple docstring'''




        super().__init__(**_lowercase )
        if layer_type not in self.layer_types:
              raise ValueError(f'layer_type={layer_type} is not one of {",".join(self.layer_types )}' )
        if global_padding is not None:
              if global_padding.upper() in self.supported_padding:
                    A_						:  List[str]          =				global_padding.upper()
              else:
                    raise ValueError(f'Padding strategy {global_padding} not supported' )
        A_						:  int          =				num_channels
        A_						:  Any          =				embedding_size
        A_						:  int          =				hidden_sizes
        A_						:  int          =				depths
        A_						:  List[str]          =				layer_type
        A_						:  Optional[Any]          =				hidden_act
        A_						:  Dict          =				global_padding
        A_						:  Any          =				num_groups
        A_						:  Dict          =				drop_path_rate
        A_						:  List[Any]          =				embedding_dynamic_padding
        A_						:  Any          =				output_stride
        A_						:  List[Any]          =				width_factor

        A_						:  Union[str, Any]          =				["""stem"""] + [f'stage{idx}' for idx in range(1	,len(_lowercase ) + 1 )]
        A_   ,					A_						:  Any          =				get_aligned_output_features_output_indices(
            out_features=_lowercase	,out_indices=_lowercase	,stage_names=self.stage_names )




'''simple docstring'''


from ..utils import DummyObject, requires_backends



class 	__lowerCAmelCase		(							metaclass=__SCREAMING_SNAKE_CASE    ):


  '''simple docstring'''







  a_  					=							["""torch""", """torchsde"""]






  def __init__(							self :       Any	,*_a :       Union[str, Any]	,**_a :       Optional[int] ):

        '''simple docstring'''




        requires_backends(self	,["""torch""", """torchsde"""] )






  @classmethod
  def        _a							(							cls :       Optional[int]	,*_a :       List[Any]	,**_a :       Any ):

        '''simple docstring'''




        requires_backends(cls	,["""torch""", """torchsde"""] )






  @classmethod
  def        _a							(							cls :       List[Any]	,*_a :       Tuple	,**_a :       Union[str, Any] ):

        '''simple docstring'''




        requires_backends(cls	,["""torch""", """torchsde"""] )
