"""simple docstring"""





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


__A  =				logging.get_logger(__name__)

__A  =				{
    '''google/bit-50''': '''https://huggingface.co/google/bit-50/resolve/main/config.json''',
}
class  _snake_case     (					a__				, a__		):
						snake_case__			  =			"bit"
						snake_case__			  =			["preactivation", "bottleneck"]
						snake_case__			  =			["SAME", "VALID"]






						def __init__(       self      :			List[str]							,					UpperCAmelCase      :			Any=3							,					UpperCAmelCase      :			Any=64							,					UpperCAmelCase      :			Tuple=[256, 512, 1024, 2048]							,					UpperCAmelCase      :			Any=[3, 4, 6, 3]							,					UpperCAmelCase      :			Any="preactivation"							,					UpperCAmelCase      :			Any="relu"							,					UpperCAmelCase      :			List[Any]=None							,					UpperCAmelCase      :			str=32							,					UpperCAmelCase      :			List[str]=0.0							,					UpperCAmelCase      :			List[str]=False							,					UpperCAmelCase      :			Optional[int]=32							,					UpperCAmelCase      :			str=1							,					UpperCAmelCase      :			Optional[Any]=None							,					UpperCAmelCase      :			Union[str, Any]=None							,					**UpperCAmelCase      :			int							,					):
													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:
																											__lowerCamelCase					:		str							   =     global_padding.upper()
																				else:
																											raise ValueError(F"""Padding strategy {global_padding} not supported"""    )
													__lowerCamelCase					:		Tuple							   =     num_channels
													__lowerCamelCase					:		Optional[int]							   =     embedding_size
													__lowerCamelCase					:		str							   =     hidden_sizes
													__lowerCamelCase					:		Union[str, Any]							   =     depths
													__lowerCamelCase					:		Union[str, Any]							   =     layer_type
													__lowerCamelCase					:		str							   =     hidden_act
													__lowerCamelCase					:		Union[str, Any]							   =     global_padding
													__lowerCamelCase					:		List[str]							   =     num_groups
													__lowerCamelCase					:		Any							   =     drop_path_rate
													__lowerCamelCase					:		List[str]							   =     embedding_dynamic_padding
													__lowerCamelCase					:		List[str]							   =     output_stride
													__lowerCamelCase					:		List[str]							   =     width_factor

													__lowerCamelCase					:		Any							   =     ["stem"] + [F"""stage{idx}""" for idx in range(1							,					len(UpperCAmelCase    ) + 1    )]
													__lowerCamelCase					:		int							   =     get_aligned_output_features_output_indices(
													    out_features=UpperCAmelCase							,					out_indices=UpperCAmelCase							,					stage_names=self.stage_names    )
"""simple docstring"""





import copy
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, Optional, Union
@dataclass
class  _snake_case     :
						snake_case__			  =			None
						snake_case__			  =			False
						snake_case__			  =			False
						snake_case__			  =			False
						snake_case__			  =			None
						snake_case__			  =			None
						snake_case__			  =			False
						snake_case__			  =			False
						snake_case__			  =			False
						snake_case__			  =			True
						snake_case__			  =			None
						snake_case__			  =			1
						snake_case__			  =			None
						snake_case__			  =			False
						snake_case__			  =			None
						snake_case__			  =			None






						def       lowerCamelCase__     (       self      :			Any    ):
													return self.__class__(**{k: copy.deepcopy(UpperCAmelCase    ) for k, v in self.__dict__.items()}    )