






'''simple docstring'''



import functools
import operator

from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCamelCase      :       List[Any]      			=      logging.get_logger(__name__)

__UpperCamelCase      :       Union[str, Any]      			=      {
    """asapp/sew-tiny-100k""": """https://huggingface.co/asapp/sew-tiny-100k/resolve/main/config.json""",
    # See all SEW models at https://huggingface.co/models?filter=sew
}
class 							__SCREAMING_SNAKE_CASE      (							__lowerCamelCase     ):
      __a  					='sew'




      def __init__(  self ,   lowerCamelCase=32 ,   lowerCamelCase=768 ,   lowerCamelCase=12 ,   lowerCamelCase=12 ,   lowerCamelCase=3072 ,   lowerCamelCase=2 ,   lowerCamelCase="gelu" ,   lowerCamelCase=0.1 ,   lowerCamelCase=0.1 ,   lowerCamelCase=0.1 ,   lowerCamelCase=0.0 ,   lowerCamelCase=0.1 ,   lowerCamelCase=0.1 ,   lowerCamelCase=0.02 ,   lowerCamelCase=1e-5 ,   lowerCamelCase="group" ,   lowerCamelCase="gelu" ,   lowerCamelCase=(64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512) ,   lowerCamelCase=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1) ,   lowerCamelCase=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1) ,   lowerCamelCase=False ,   lowerCamelCase=128 ,   lowerCamelCase=16 ,   lowerCamelCase=True ,   lowerCamelCase=0.05 ,   lowerCamelCase=10 ,   lowerCamelCase=2 ,   lowerCamelCase=0.0 ,   lowerCamelCase=10 ,   lowerCamelCase=0 ,   lowerCamelCase="mean" ,   lowerCamelCase=False ,   lowerCamelCase=False ,   lowerCamelCase=256 ,   lowerCamelCase=0 ,   lowerCamelCase=1 ,   lowerCamelCase=2 ,   **lowerCamelCase ,   )							->List[Any]:



         '''simple docstring'''
         super().__init__(**UpperCamelCase_ ,   pad_token_id=UpperCamelCase_ ,   bos_token_id=UpperCamelCase_ ,   eos_token_id=UpperCamelCase_      )
         __a				     =    hidden_size
         __a				     =    feat_extract_norm
         __a				     =    feat_extract_activation
         __a				     =    list(UpperCamelCase_      )
         __a				     =    list(UpperCamelCase_      )
         __a				     =    list(UpperCamelCase_      )
         __a				     =    conv_bias
         __a				     =    num_conv_pos_embeddings
         __a				     =    num_conv_pos_embedding_groups
         __a				     =    len(self.conv_dim      )
         __a				     =    num_hidden_layers
         __a				     =    intermediate_size
         __a				     =    squeeze_factor
         __a				     =    hidden_act
         __a				     =    num_attention_heads
         __a				     =    hidden_dropout
         __a				     =    attention_dropout
         __a				     =    activation_dropout
         __a				     =    feat_proj_dropout
         __a				     =    final_dropout
         __a				     =    layerdrop
         __a				     =    layer_norm_eps
         __a				     =    initializer_range
         __a				     =    vocab_size

         if (
             (len(self.conv_stride      ) != self.num_feat_extract_layers)
             or (len(self.conv_kernel      ) != self.num_feat_extract_layers)
             or (len(self.conv_dim      ) != self.num_feat_extract_layers)
         ):
            raise ValueError(
                'Configuration for convolutional layers is incorrect.'
                'It is required that `len(config.conv_dim)` == `len(config.conv_stride)` == `len(config.conv_kernel)`,'
                F"""but is `len(config.conv_dim) = {len(self.conv_dim      )}`, `len(config.conv_stride)"""
                F"""= {len(self.conv_stride      )}`, `len(config.conv_kernel) = {len(self.conv_kernel      )}`."""      )

         # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
         __a				     =    apply_spec_augment
         __a				     =    mask_time_prob
         __a				     =    mask_time_length
         __a				     =    mask_time_min_masks
         __a				     =    mask_feature_prob
         __a				     =    mask_feature_length
         __a				     =    mask_feature_min_masks

         # ctc loss
         __a				     =    ctc_loss_reduction
         __a				     =    ctc_zero_infinity

         # sequence classification
         __a				     =    use_weighted_layer_sum
         __a				     =    classifier_proj_size






      @property
      def  __UpperCamelCase							(  self      )							->Optional[Any]:



         '''simple docstring'''
         return functools.reduce(operator.mul ,   self.conv_stride ,   1      )







'''simple docstring'''



from ...configuration_utils import PretrainedConfig
from ...utils import logging


__UpperCamelCase      :       List[str]      			=      logging.get_logger(__name__)

__UpperCamelCase      :       Tuple      			=      {
    """sayakpaul/vit-msn-base""": """https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json""",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}
class 							__SCREAMING_SNAKE_CASE       (							_lowerCAmelCase     ):
      __a  					="vit_msn"




      def __init__(  self ,   lowerCamelCase=768 ,   lowerCamelCase=12 ,   lowerCamelCase=12 ,   lowerCamelCase=3072 ,   lowerCamelCase="gelu" ,   lowerCamelCase=0.0 ,   lowerCamelCase=0.0 ,   lowerCamelCase=0.02 ,   lowerCamelCase=1e-06 ,   lowerCamelCase=224 ,   lowerCamelCase=16 ,   lowerCamelCase=3 ,   lowerCamelCase=True ,   **lowerCamelCase ,   )							->Tuple:



         '''simple docstring'''
         super().__init__(**lowerCamelCase      )

         __a				     =    hidden_size
         __a				     =    num_hidden_layers
         __a				     =    num_attention_heads
         __a				     =    intermediate_size
         __a				     =    hidden_act
         __a				     =    hidden_dropout_prob
         __a				     =    attention_probs_dropout_prob
         __a				     =    initializer_range
         __a				     =    layer_norm_eps
         __a				     =    image_size
         __a				     =    patch_size
         __a				     =    num_channels
         __a				     =    qkv_bias