



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


__snake_case						:Any      		=     logging.get_logger(__name__)

__snake_case						:Tuple      		=     {
    '''microsoft/focalnet-tiny''': '''https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json''',
}

class     _A       (	__UpperCAmelCase      ,__UpperCAmelCase    ):
       UpperCamelCase__  :    Any											=						'''focalnet'''



       def __init__(		self							:     Dict     ,		__SCREAMING_SNAKE_CASE							:     Tuple=224     ,		__SCREAMING_SNAKE_CASE							:     Tuple=4     ,		__SCREAMING_SNAKE_CASE							:     Union[str, Any]=3     ,		__SCREAMING_SNAKE_CASE							:     Optional[int]=96     ,		__SCREAMING_SNAKE_CASE							:     str=False     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=[192, 384, 768, 768]     ,		__SCREAMING_SNAKE_CASE							:     Optional[int]=[2, 2, 6, 2]     ,		__SCREAMING_SNAKE_CASE							:     List[str]=[2, 2, 2, 2]     ,		__SCREAMING_SNAKE_CASE							:     Dict=[3, 3, 3, 3]     ,		__SCREAMING_SNAKE_CASE							:     int="gelu"     ,		__SCREAMING_SNAKE_CASE							:     str=4.0     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=0.0     ,		__SCREAMING_SNAKE_CASE							:     Dict=0.1     ,		__SCREAMING_SNAKE_CASE							:     Dict=False     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=1E-4     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=False     ,		__SCREAMING_SNAKE_CASE							:     str=False     ,		__SCREAMING_SNAKE_CASE							:     int=False     ,		__SCREAMING_SNAKE_CASE							:     Dict=0.02     ,		__SCREAMING_SNAKE_CASE							:     Dict=1E-5     ,		__SCREAMING_SNAKE_CASE							:     Any=32     ,		__SCREAMING_SNAKE_CASE							:     Tuple=None     ,		__SCREAMING_SNAKE_CASE							:     Any=None     ,		**__SCREAMING_SNAKE_CASE							:     List[Any]     ,		):


           '''simple docstring'''

           super().__init__(**__SCREAMING_SNAKE_CASE)

           __a						       =				image_size
           __a						       =				patch_size
           __a						       =				num_channels
           __a						       =				embed_dim
           __a						       =				use_conv_embed
           __a						       =				hidden_sizes
           __a						       =				depths
           __a						       =				focal_levels
           __a						       =				focal_windows
           __a						       =				hidden_act
           __a						       =				mlp_ratio
           __a						       =				hidden_dropout_prob
           __a						       =				drop_path_rate
           __a						       =				use_layerscale
           __a						       =				layerscale_value
           __a						       =				use_post_layernorm
           __a						       =				use_post_layernorm_in_modulation
           __a						       =				normalize_modulator
           __a						       =				initializer_range
           __a						       =				layer_norm_eps
           __a						       =				encoder_stride
           __a						       =				['''stem'''] + [F'stage{idx}' for idx in range(1     ,		len(self.depths) + 1)]
           __a       ,   __a						       =				get_aligned_output_features_output_indices(
               out_features=__SCREAMING_SNAKE_CASE     ,		out_indices=__SCREAMING_SNAKE_CASE     ,		stage_names=self.stage_names)













'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available


_A	:			Dict         ={'''tokenization_herbert''': ['''HerbertTokenizer''']}

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_A	:			Optional[int]         =['''HerbertTokenizerFast''']


if TYPE_CHECKING:
			from .tokenization_herbert import HerbertTokenizer

			try:
						if not is_tokenizers_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .tokenization_herbert_fast import HerbertTokenizerFast

else:
			import sys

			_A	:			Optional[int]         =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

