
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  (		__magic_name__			,	__magic_name__							):

 """simple docstring"""
 SCREAMING_SNAKE_CASE_				:					Optional[int]       						="bit"
 SCREAMING_SNAKE_CASE_				:					Union[str, Any]       						=["preactivation", "bottleneck"]
 SCREAMING_SNAKE_CASE_				:					Union[str, Any]       						=["SAME", "VALID"]

 def __init__(						self			:			List[str]					, SCREAMING_SNAKE_CASE__			:			Optional[Any]=3					, SCREAMING_SNAKE_CASE__			:			Any=64					, SCREAMING_SNAKE_CASE__			:			Tuple=[2_56, 5_12, 10_24, 20_48]					, SCREAMING_SNAKE_CASE__			:			int=[3, 4, 6, 3]					, SCREAMING_SNAKE_CASE__			:			str="preactivation"					, SCREAMING_SNAKE_CASE__			:			str="relu"					, SCREAMING_SNAKE_CASE__			:			Union[str, Any]=None					, SCREAMING_SNAKE_CASE__			:			Dict=32					, SCREAMING_SNAKE_CASE__			:			Union[str, Any]=0.0					, SCREAMING_SNAKE_CASE__			:			Optional[Any]=False					, SCREAMING_SNAKE_CASE__			:			Any=32					, SCREAMING_SNAKE_CASE__			:			Any=1					, SCREAMING_SNAKE_CASE__			:			Tuple=None					, SCREAMING_SNAKE_CASE__			:			Union[str, Any]=None					, **SCREAMING_SNAKE_CASE__			:			Optional[Any]					, ):






      """simple docstring"""



      super().__init__(**SCREAMING_SNAKE_CASE__   )
      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:
                UpperCamelCase						    =					global_padding.upper()
           else:
                raise ValueError(F'Padding strategy {global_padding} not supported'   )
      UpperCamelCase						    =					num_channels
      UpperCamelCase						    =					embedding_size
      UpperCamelCase						    =					hidden_sizes
      UpperCamelCase						    =					depths
      UpperCamelCase						    =					layer_type
      UpperCamelCase						    =					hidden_act
      UpperCamelCase						    =					global_padding
      UpperCamelCase						    =					num_groups
      UpperCamelCase						    =					drop_path_rate
      UpperCamelCase						    =					embedding_dynamic_padding
      UpperCamelCase						    =					output_stride
      UpperCamelCase						    =					width_factor

      UpperCamelCase						    =					['stem'] + [F'stage{idx}' for idx in range(1					, len(SCREAMING_SNAKE_CASE__   ) + 1   )]
      UpperCamelCase    ,		UpperCamelCase						    =					get_aligned_output_features_output_indices(
          out_features=SCREAMING_SNAKE_CASE__					, out_indices=SCREAMING_SNAKE_CASE__					, stage_names=self.stage_names   )




def  __lowerCamelCase					( _lowercase			)       ->      str:
     return "".join(chr(ord(_lowercase			) - 32			) if 'a' <= char <= 'z' else char for char in word			)


if __name__ == "__main__":
 from doctest import testmod

 testmod()


