


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


UpperCAmelCase_      : Optional[Any]  					=       logging.get_logger(__name__)

UpperCAmelCase_      : List[Any]  					=       {
    'google/bit-50': 'https://huggingface.co/google/bit-50/resolve/main/config.json',
}
class  SCREAMING_SNAKE_CASE__  (				lowercase__						,    lowercase__			):
      snake_case__				:     Optional[int]        =						'''bit'''
      snake_case__				:     Optional[Any]        =						['''preactivation''', '''bottleneck''']
      snake_case__				:     Tuple        =						['''SAME''', '''VALID''']
      def __init__(       self				:       Dict     ,							SCREAMING_SNAKE_CASE__				:       List[Any]=3     ,							SCREAMING_SNAKE_CASE__				:       Optional[int]=6_4     ,							SCREAMING_SNAKE_CASE__				:       Optional[int]=[2_5_6, 5_1_2, 1_0_2_4, 2_0_4_8]     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]=[3, 4, 6, 3]     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]="preactivation"     ,							SCREAMING_SNAKE_CASE__				:       Tuple="relu"     ,							SCREAMING_SNAKE_CASE__				:       List[str]=None     ,							SCREAMING_SNAKE_CASE__				:       Dict=3_2     ,							SCREAMING_SNAKE_CASE__				:       Tuple=0.0     ,							SCREAMING_SNAKE_CASE__				:       Any=False     ,							SCREAMING_SNAKE_CASE__				:       Tuple=3_2     ,							SCREAMING_SNAKE_CASE__				:       str=1     ,							SCREAMING_SNAKE_CASE__				:       Union[str, Any]=None     ,							SCREAMING_SNAKE_CASE__				:       Union[str, Any]=None     ,							**SCREAMING_SNAKE_CASE__				:       str     ,							)		->			str:
             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:
                           a_					:		Any							=  global_padding.upper()
                    else:
                           raise ValueError(F"""Padding strategy {global_padding} not supported"""     )
             a_					:		Optional[Any]							=  num_channels
             a_					:		List[Any]							=  embedding_size
             a_					:		Union[str, Any]							=  hidden_sizes
             a_					:		List[str]							=  depths
             a_					:		Any							=  layer_type
             a_					:		Optional[int]							=  hidden_act
             a_					:		Tuple							=  global_padding
             a_					:		List[Any]							=  num_groups
             a_					:		List[str]							=  drop_path_rate
             a_					:		List[Any]							=  embedding_dynamic_padding
             a_					:		int							=  output_stride
             a_					:		str							=  width_factor

             a_					:		Dict							=  ['stem'] + [F"""stage{idx}""" for idx in range(1     ,							len(SCREAMING_SNAKE_CASE__     ) + 1     )]
             a_							,		a_					:		List[Any]							=  get_aligned_output_features_output_indices(
                 out_features=SCREAMING_SNAKE_CASE__     ,							out_indices=SCREAMING_SNAKE_CASE__     ,							stage_names=self.stage_names     )





from .glue import GlueDataset, GlueDataTrainingArguments
from .language_modeling import (
    LineByLineTextDataset,
    LineByLineWithRefDataset,
    LineByLineWithSOPTextDataset,
    TextDataset,
    TextDatasetForNextSentencePrediction,
)
from .squad import SquadDataset, SquadDataTrainingArguments
