



import functools
import operator

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


lowerCamelCase		       =      logging.get_logger(__name__)

lowerCamelCase		       =      {
    """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 				_a						(       _UpperCAmelCase			):





							'''simple docstring'''

							A				:Dict =       'sew'



							def __init__(							self ,					__UpperCAmelCase=32 ,					__UpperCAmelCase=768 ,					__UpperCAmelCase=12 ,					__UpperCAmelCase=12 ,					__UpperCAmelCase=3072 ,					__UpperCAmelCase=2 ,					__UpperCAmelCase="gelu" ,					__UpperCAmelCase=0.1 ,					__UpperCAmelCase=0.1 ,					__UpperCAmelCase=0.1 ,					__UpperCAmelCase=0.0 ,					__UpperCAmelCase=0.1 ,					__UpperCAmelCase=0.1 ,					__UpperCAmelCase=0.0_2 ,					__UpperCAmelCase=1E-5 ,					__UpperCAmelCase="group" ,					__UpperCAmelCase="gelu" ,					__UpperCAmelCase=(64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512) ,					__UpperCAmelCase=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1) ,					__UpperCAmelCase=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1) ,					__UpperCAmelCase=False ,					__UpperCAmelCase=128 ,					__UpperCAmelCase=16 ,					__UpperCAmelCase=True ,					__UpperCAmelCase=0.0_5 ,					__UpperCAmelCase=10 ,					__UpperCAmelCase=2 ,					__UpperCAmelCase=0.0 ,					__UpperCAmelCase=10 ,					__UpperCAmelCase=0 ,					__UpperCAmelCase="mean" ,					__UpperCAmelCase=False ,					__UpperCAmelCase=False ,					__UpperCAmelCase=256 ,					__UpperCAmelCase=0 ,					__UpperCAmelCase=1 ,					__UpperCAmelCase=2 ,					**__UpperCAmelCase ,					):







											"""simple docstring"""



											super().__init__(**SCREAMING_SNAKE_CASE_ ,					pad_token_id=SCREAMING_SNAKE_CASE_ ,					bos_token_id=SCREAMING_SNAKE_CASE_ ,					eos_token_id=SCREAMING_SNAKE_CASE_				)
											a__	:							Union[str, Any]      						= hidden_size
											a__	:							int      						= feat_extract_norm
											a__	:							Optional[int]      						= feat_extract_activation
											a__	:							Any      						= list(SCREAMING_SNAKE_CASE_				)
											a__	:							Union[str, Any]      						= list(SCREAMING_SNAKE_CASE_				)
											a__	:							str      						= list(SCREAMING_SNAKE_CASE_				)
											a__	:							Tuple      						= conv_bias
											a__	:							Dict      						= num_conv_pos_embeddings
											a__	:							Optional[Any]      						= num_conv_pos_embedding_groups
											a__	:							Dict      						= len(self.conv_dim				)
											a__	:							Optional[Any]      						= num_hidden_layers
											a__	:							Tuple      						= intermediate_size
											a__	:							List[Any]      						= squeeze_factor
											a__	:							List[str]      						= hidden_act
											a__	:							Dict      						= num_attention_heads
											a__	:							Dict      						= hidden_dropout
											a__	:							Tuple      						= attention_dropout
											a__	:							Dict      						= activation_dropout
											a__	:							Optional[int]      						= feat_proj_dropout
											a__	:							Tuple      						= final_dropout
											a__	:							str      						= layerdrop
											a__	:							int      						= layer_norm_eps
											a__	:							int      						= initializer_range
											a__	:							Optional[int]      						= 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__	:							Optional[Any]      						= apply_spec_augment
											a__	:							Tuple      						= mask_time_prob
											a__	:							Any      						= mask_time_length
											a__	:							int      						= mask_time_min_masks
											a__	:							int      						= mask_feature_prob
											a__	:							Dict      						= mask_feature_length
											a__	:							List[str]      						= mask_feature_min_masks

											# ctc loss
											a__	:							Any      						= ctc_loss_reduction
											a__	:							List[Any]      						= ctc_zero_infinity

											# sequence classification
											a__	:							List[Any]      						= use_weighted_layer_sum
											a__	:							Union[str, Any]      						= classifier_proj_size




							@property
							def 		_A	(							self				):







											"""simple docstring"""



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






'''simple docstring'''



# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# this script dumps information about the environment

import os
import platform
import sys


A__						:   List[str]				=    """3"""

print("""Python version:""", sys.version)

print("""OS platform:""", platform.platform())
print("""OS architecture:""", platform.machine())

try:
      import torch

      print("""Torch version:""", torch.__version__)
      print("""Cuda available:""", torch.cuda.is_available())
      print("""Cuda version:""", torch.version.cuda)
      print("""CuDNN version:""", torch.backends.cudnn.version())
      print("""Number of GPUs available:""", torch.cuda.device_count())
except ImportError:
      print("""Torch version:""", None)

try:
      import transformers

      print("""transformers version:""", transformers.__version__)
except ImportError:
      print("""transformers version:""", None)






