


"""simple docstring"""



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


__snake_case         =					logging.get_logger(__name__)

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







class _lowerCAmelCase       (   snake_case_					,							snake_case_			):
   __UpperCAmelCase				: Any													=						'''bit'''
   __UpperCAmelCase				: Tuple													=						['''preactivation''', '''bottleneck''']
   __UpperCAmelCase				: List[Any]													=						['''SAME''', '''VALID''']







   def __init__(			self		,			UpperCamelCase__=3		,			UpperCamelCase__=64		,			UpperCamelCase__=[256, 512, 1024, 2048]		,			UpperCamelCase__=[3, 4, 6, 3]		,			UpperCamelCase__="preactivation"		,			UpperCamelCase__="relu"		,			UpperCamelCase__=None		,			UpperCamelCase__=32		,			UpperCamelCase__=0.0		,			UpperCamelCase__=False		,			UpperCamelCase__=32		,			UpperCamelCase__=1		,			UpperCamelCase__=None		,			UpperCamelCase__=None		,			**UpperCamelCase__		,			)			->	Optional[Any]:

       '''simple docstring'''




       super().__init__(**UpperCamelCase__		)
       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:
               snake_case					:   int         =					global_padding.upper()
           else:
               raise ValueError(F'Padding strategy {global_padding} not supported'		)
       snake_case					:   Dict         =					num_channels
       snake_case					:   List[Any]         =					embedding_size
       snake_case					:   List[Any]         =					hidden_sizes
       snake_case					:   Tuple         =					depths
       snake_case					:   Optional[Any]         =					layer_type
       snake_case					:   Any         =					hidden_act
       snake_case					:   Dict         =					global_padding
       snake_case					:   Tuple         =					num_groups
       snake_case					:   str         =					drop_path_rate
       snake_case					:   int         =					embedding_dynamic_padding
       snake_case					:   Union[str, Any]         =					output_stride
       snake_case					:   List[str]         =					width_factor

       snake_case					:   Tuple         =					["stem"] + [F'stage{idx}' for idx in range(1		,			len(UpperCamelCase__		) + 1		)]
       snake_case					:   Any         =					get_aligned_output_features_output_indices(
           out_features=UpperCamelCase__		,			out_indices=UpperCamelCase__		,			stage_names=self.stage_names		)









"""simple docstring"""



import baseaa







def 						__lowerCAmelCase		(		lowercase						:						str				)			->		bytes:


    """simple docstring"""





    return baseaa.aaaencode(string.encode("utf-8"				)				)







def 						__lowerCAmelCase		(		lowercase						:						bytes				)			->		str:


    """simple docstring"""





    return baseaa.aaadecode(lowercase				).decode("utf-8"				)


if __name__ == "__main__":
  import doctest

  doctest.testmod()





