


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


_UpperCAmelCase             =							logging.get_logger(__name__)

_UpperCAmelCase             =							{
    '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        snake_case_    (		__lowercase						):
  A_      							=   'vit_msn'






  def __init__(							self			:					Optional[Any]       ,  _snake_case			:					Optional[Any]=768       ,  _snake_case			:					Optional[Any]=12       ,  _snake_case			:					int=12       ,  _snake_case			:					Optional[Any]=3072       ,  _snake_case			:					Union[str, Any]="gelu"       ,  _snake_case			:					Optional[int]=0.0       ,  _snake_case			:					Optional[Any]=0.0       ,  _snake_case			:					List[str]=0.02       ,  _snake_case			:					Optional[int]=1E-06       ,  _snake_case			:					Optional[Any]=224       ,  _snake_case			:					int=16       ,  _snake_case			:					str=3       ,  _snake_case			:					Any=True       ,  **_snake_case			:					Optional[int]       ,  )->Tuple:






   '''simple docstring'''

   super().__init__(**_snake_case      )

   __lowerCAmelCase					:	Union[str, Any]      =       hidden_size
   __lowerCAmelCase					:	Tuple      =       num_hidden_layers
   __lowerCAmelCase					:	str      =       num_attention_heads
   __lowerCAmelCase					:	str      =       intermediate_size
   __lowerCAmelCase					:	Optional[Any]      =       hidden_act
   __lowerCAmelCase					:	Tuple      =       hidden_dropout_prob
   __lowerCAmelCase					:	List[str]      =       attention_probs_dropout_prob
   __lowerCAmelCase					:	List[str]      =       initializer_range
   __lowerCAmelCase					:	Optional[Any]      =       layer_norm_eps
   __lowerCAmelCase					:	Optional[Any]      =       image_size
   __lowerCAmelCase					:	int      =       patch_size
   __lowerCAmelCase					:	Optional[int]      =       num_channels
   __lowerCAmelCase					:	Optional[Any]      =       qkv_bias






import functools
import operator

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


_UpperCAmelCase             =							logging.get_logger(__name__)

_UpperCAmelCase             =							{
    'microsoft/unispeech-sat-base-100h-libri-ft': (
        'https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft/resolve/main/config.json'
    ),
    # See all UniSpeechSat models at https://huggingface.co/models?filter=unispeech_sat
}






class        snake_case_    (		__lowercase						):
  A_      							=   'unispeech-sat'






  def __init__(							self			:					str       ,  _snake_case			:					List[Any]=32       ,  _snake_case			:					Union[str, Any]=768       ,  _snake_case			:					Tuple=12       ,  _snake_case			:					Optional[int]=12       ,  _snake_case			:					Optional[Any]=3072       ,  _snake_case			:					Tuple="gelu"       ,  _snake_case			:					int=0.1       ,  _snake_case			:					List[Any]=0.1       ,  _snake_case			:					Union[str, Any]=0.1       ,  _snake_case			:					str=0.0       ,  _snake_case			:					List[str]=0.0       ,  _snake_case			:					int=0.1       ,  _snake_case			:					Optional[Any]=0.1       ,  _snake_case			:					Optional[Any]=0.02       ,  _snake_case			:					int=1E-5       ,  _snake_case			:					Dict="group"       ,  _snake_case			:					Optional[Any]="gelu"       ,  _snake_case			:					Optional[Any]=(512, 512, 512, 512, 512, 512, 512)       ,  _snake_case			:					int=(5, 2, 2, 2, 2, 2, 2)       ,  _snake_case			:					int=(10, 3, 3, 3, 3, 2, 2)       ,  _snake_case			:					Any=False       ,  _snake_case			:					Optional[Any]=128       ,  _snake_case			:					Tuple=16       ,  _snake_case			:					str=False       ,  _snake_case			:					Dict=True       ,  _snake_case			:					Tuple=0.05       ,  _snake_case			:					str=10       ,  _snake_case			:					Tuple=2       ,  _snake_case			:					List[Any]=0.0       ,  _snake_case			:					str=10       ,  _snake_case			:					Any=0       ,  _snake_case			:					List[Any]=320       ,  _snake_case			:					Union[str, Any]=2       ,  _snake_case			:					Dict=0.1       ,  _snake_case			:					Dict=100       ,  _snake_case			:					Union[str, Any]=256       ,  _snake_case			:					int=256       ,  _snake_case			:					Union[str, Any]=0.1       ,  _snake_case			:					Optional[Any]="mean"       ,  _snake_case			:					int=False       ,  _snake_case			:					str=False       ,  _snake_case			:					str=256       ,  _snake_case			:					List[Any]=(512, 512, 512, 512, 1500)       ,  _snake_case			:					Optional[int]=(5, 3, 3, 1, 1)       ,  _snake_case			:					Tuple=(1, 2, 3, 1, 1)       ,  _snake_case			:					Dict=512       ,  _snake_case			:					Union[str, Any]=0       ,  _snake_case			:					List[str]=1       ,  _snake_case			:					Optional[Any]=2       ,  _snake_case			:					Optional[int]=504       ,  **_snake_case			:					Optional[int]       ,  )->Union[str, Any]:






   '''simple docstring'''

   super().__init__(**_snake_case       ,  pad_token_id=_snake_case       ,  bos_token_id=_snake_case       ,  eos_token_id=_snake_case      )
   __lowerCAmelCase					:	Dict      =       hidden_size
   __lowerCAmelCase					:	List[Any]      =       feat_extract_norm
   __lowerCAmelCase					:	int      =       feat_extract_activation
   __lowerCAmelCase					:	Union[str, Any]      =       list(_snake_case      )
   __lowerCAmelCase					:	str      =       list(_snake_case      )
   __lowerCAmelCase					:	Optional[Any]      =       list(_snake_case      )
   __lowerCAmelCase					:	Optional[int]      =       conv_bias
   __lowerCAmelCase					:	Dict      =       num_conv_pos_embeddings
   __lowerCAmelCase					:	List[Any]      =       num_conv_pos_embedding_groups
   __lowerCAmelCase					:	Tuple      =       len(self.conv_dim      )
   __lowerCAmelCase					:	int      =       num_hidden_layers
   __lowerCAmelCase					:	str      =       intermediate_size
   __lowerCAmelCase					:	str      =       hidden_act
   __lowerCAmelCase					:	Any      =       num_attention_heads
   __lowerCAmelCase					:	Optional[int]      =       hidden_dropout
   __lowerCAmelCase					:	str      =       attention_dropout
   __lowerCAmelCase					:	int      =       activation_dropout
   __lowerCAmelCase					:	Union[str, Any]      =       feat_proj_dropout
   __lowerCAmelCase					:	List[str]      =       final_dropout
   __lowerCAmelCase					:	Dict      =       layerdrop
   __lowerCAmelCase					:	Tuple      =       layer_norm_eps
   __lowerCAmelCase					:	Optional[Any]      =       initializer_range
   __lowerCAmelCase					:	str      =       vocab_size
   __lowerCAmelCase					:	Optional[int]      =       num_clusters
   __lowerCAmelCase					:	List[Any]      =       do_stable_layer_norm
   __lowerCAmelCase					:	Tuple      =       use_weighted_layer_sum

   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)`, but is `len(config.conv_dim) ="""
        F''' {len(self.conv_dim      )}`, `len(config.conv_stride) = {len(self.conv_stride      )}`,'''
        F''' `len(config.conv_kernel) = {len(self.conv_kernel      )}`.'''      )

   # fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
   __lowerCAmelCase					:	Dict      =       apply_spec_augment
   __lowerCAmelCase					:	List[Any]      =       mask_time_prob
   __lowerCAmelCase					:	List[str]      =       mask_time_length
   __lowerCAmelCase					:	Dict      =       mask_time_min_masks
   __lowerCAmelCase					:	Tuple      =       mask_feature_prob
   __lowerCAmelCase					:	List[str]      =       mask_feature_length
   __lowerCAmelCase					:	str      =       mask_feature_min_masks

   # parameters for pretraining with codevector quantized representations
   __lowerCAmelCase					:	Optional[int]      =       num_codevectors_per_group
   __lowerCAmelCase					:	List[Any]      =       num_codevector_groups
   __lowerCAmelCase					:	int      =       contrastive_logits_temperature
   __lowerCAmelCase					:	str      =       feat_quantizer_dropout
   __lowerCAmelCase					:	int      =       num_negatives
   __lowerCAmelCase					:	str      =       codevector_dim
   __lowerCAmelCase					:	Any      =       proj_codevector_dim
   __lowerCAmelCase					:	Any      =       diversity_loss_weight

   # ctc loss
   __lowerCAmelCase					:	Tuple      =       ctc_loss_reduction
   __lowerCAmelCase					:	Any      =       ctc_zero_infinity

   # SequenceClassification-specific parameter. Feel free to ignore for other classes.
   __lowerCAmelCase					:	Any      =       classifier_proj_size

   # XVector-specific parameters. Feel free to ignore for other classes.
   __lowerCAmelCase					:	List[str]      =       list(_snake_case      )
   __lowerCAmelCase					:	List[str]      =       list(_snake_case      )
   __lowerCAmelCase					:	Optional[int]      =       list(_snake_case      )
   __lowerCAmelCase					:	Optional[int]      =       xvector_output_dim






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






   '''simple docstring'''

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