



'''simple docstring'''





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


A__    :   Tuple           =					logging.get_logger(__name__)

A__    :   Optional[Any]           =					{
    '''google/bit-50''': '''https://huggingface.co/google/bit-50/resolve/main/config.json''',
}



class  snake_case__						(    SCREAMING_SNAKE_CASE_  ,     SCREAMING_SNAKE_CASE_				):
 A__				= '''bit'''
 A__				= ['''preactivation''', '''bottleneck''']
 A__				= ['''SAME''', '''VALID''']
 def __init__(   self						:							Optional[Any]      ,     __a						:							List[Any]=3      ,     __a						:							Union[str, Any]=64      ,     __a						:							List[Any]=[256, 512, 1024, 2048]      ,     __a						:							Union[str, Any]=[3, 4, 6, 3]      ,     __a						:							str="preactivation"      ,     __a						:							Optional[int]="relu"      ,     __a						:							Dict=None      ,     __a						:							Union[str, Any]=32      ,     __a						:							Dict=0.0      ,     __a						:							Dict=False      ,     __a						:							Any=32      ,     __a						:							Dict=1      ,     __a						:							Tuple=None      ,     __a						:							Any=None      ,     **__a						:							List[str]      ,     )      ->   str:







       '''simple docstring'''
       super().__init__(**__a  )
       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 :   Any													=    embedding_size
       __snake_case :   Optional[int]													=    hidden_sizes
       __snake_case :   str													=    depths
       __snake_case :   Optional[Any]													=    layer_type
       __snake_case :   Any													=    hidden_act
       __snake_case :   Union[str, Any]													=    global_padding
       __snake_case :   int													=    num_groups
       __snake_case :   Any													=    drop_path_rate
       __snake_case :   Dict													=    embedding_dynamic_padding
       __snake_case :   List[Any]													=    output_stride
       __snake_case :   Union[str, Any]													=    width_factor

       __snake_case :   List[Any]													=    ['stem'] + [f'''stage{idx}''' for idx in range(1      ,     len(__a  ) + 1  )]
       __snake_case							,     __snake_case :   Any													=    get_aligned_output_features_output_indices(
           out_features=__a      ,     out_indices=__a      ,     stage_names=self.stage_names  )








'''simple docstring'''





from typing import TYPE_CHECKING

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


A__    :   Optional[Any]           =					{
    '''configuration_squeezebert''': [
        '''SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''SqueezeBertConfig''',
        '''SqueezeBertOnnxConfig''',
    ],
    '''tokenization_squeezebert''': ['''SqueezeBertTokenizer'''],
}

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    A__    :   Tuple           =					['''SqueezeBertTokenizerFast''']

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    A__    :   str           =					[
        '''SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''SqueezeBertForMaskedLM''',
        '''SqueezeBertForMultipleChoice''',
        '''SqueezeBertForQuestionAnswering''',
        '''SqueezeBertForSequenceClassification''',
        '''SqueezeBertForTokenClassification''',
        '''SqueezeBertModel''',
        '''SqueezeBertModule''',
        '''SqueezeBertPreTrainedModel''',
    ]


if TYPE_CHECKING:
    from .configuration_squeezebert import (
        SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
        SqueezeBertConfig,
        SqueezeBertOnnxConfig,
    )
    from .tokenization_squeezebert import SqueezeBertTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_squeezebert_fast import SqueezeBertTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_squeezebert import (
            SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
            SqueezeBertForMaskedLM,
            SqueezeBertForMultipleChoice,
            SqueezeBertForQuestionAnswering,
            SqueezeBertForSequenceClassification,
            SqueezeBertForTokenClassification,
            SqueezeBertModel,
            SqueezeBertModule,
            SqueezeBertPreTrainedModel,
        )

else:
    import sys

    A__    :   List[Any]           =					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



