

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 				__UpperCamelCase				(					_UpperCAmelCase  ,						_UpperCAmelCase			):
	_lowercase  :   Union[str, Any]       				=  "bit"
	_lowercase  :   int       				=  ["preactivation", "bottleneck"]
	_lowercase  :   List[Any]       				=  ["SAME", "VALID"]







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

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

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





from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


A__						=							{"configuration_van": ["VAN_PRETRAINED_CONFIG_ARCHIVE_MAP", "VanConfig"]}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A__						=							[
						    "VAN_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "VanForImageClassification",
						    "VanModel",
						    "VanPreTrainedModel",
						]

if TYPE_CHECKING:
						from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_van import (
												    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
												    VanForImageClassification,
												    VanModel,
												    VanPreTrainedModel,
												)

else:
						import sys

						A__						=							_LazyModule(__name__, globals()["__file__"], _import_structure)




