

import functools
import operator

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


A_ :				Dict						 =    logging.get_logger(__name__)

A_ :				str						 =    {
    'asapp/sew-d-tiny-100k': 'https://huggingface.co/asapp/sew-d-tiny-100k/resolve/main/config.json',
    # See all SEW-D models at https://huggingface.co/models?filter=sew-d
}



class 					_a		(a__       ):


					'''simple docstring'''






					UpperCAmelCase__:     List[str]													= '''sew-d'''






					def __init__(				self					, A__=32					, A__=768					, A__=12					, A__=12					, A__=3072					, A__=2					, A__=512					, A__=256					, A__=True					, A__=True					, A__=("p2c", "c2p")					, A__="layer_norm"					, A__="gelu_python"					, A__=0.1					, A__=0.1					, A__=0.1					, A__=0.0					, A__=0.1					, A__=0.0_2					, A__=1e-7					, A__=1e-5					, A__="group"					, A__="gelu"					, A__=(64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512)					, A__=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)					, A__=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)					, A__=False					, A__=128					, A__=16					, A__=True					, A__=0.0_5					, A__=10					, A__=2					, A__=0.0					, A__=10					, A__=0					, A__="mean"					, A__=False					, A__=False					, A__=256					, A__=0					, A__=1					, A__=2					, **A__					, ):
						super().__init__(**_A					, pad_token_id=_A					, bos_token_id=_A					, eos_token_id=_A    )
						A__							:					int       =	hidden_size
						A__							:					Any       =	feat_extract_norm
						A__							:					Optional[int]       =	feat_extract_activation
						A__							:					Optional[int]       =	list(_A    )
						A__							:					List[Any]       =	list(_A    )
						A__							:					Tuple       =	list(_A    )
						A__							:					Dict       =	conv_bias
						A__							:					Optional[Any]       =	num_conv_pos_embeddings
						A__							:					str       =	num_conv_pos_embedding_groups
						A__							:					Optional[Any]       =	len(self.conv_dim    )
						A__							:					Union[str, Any]       =	num_hidden_layers
						A__							:					Optional[int]       =	intermediate_size
						A__							:					Dict       =	squeeze_factor
						A__							:					Any       =	max_position_embeddings
						A__							:					Optional[int]       =	position_buckets
						A__							:					Union[str, Any]       =	share_att_key
						A__							:					Tuple       =	relative_attention
						A__							:					int       =	norm_rel_ebd
						A__							:					str       =	list(_A    )
						A__							:					str       =	hidden_act
						A__							:					Any       =	num_attention_heads
						A__							:					List[Any]       =	hidden_dropout
						A__							:					Optional[Any]       =	attention_dropout
						A__							:					List[str]       =	activation_dropout
						A__							:					int       =	feat_proj_dropout
						A__							:					Union[str, Any]       =	final_dropout
						A__							:					Any       =	layer_norm_eps
						A__							:					str       =	feature_layer_norm_eps
						A__							:					List[str]       =	initializer_range
						A__							:					Any       =	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__							:					Tuple       =	apply_spec_augment
						A__							:					List[Any]       =	mask_time_prob
						A__							:					str       =	mask_time_length
						A__							:					Union[str, Any]       =	mask_time_min_masks
						A__							:					Any       =	mask_feature_prob
						A__							:					List[str]       =	mask_feature_length
						A__							:					List[Any]       =	mask_feature_min_masks

						# ctc loss
						A__							:					Optional[Any]       =	ctc_loss_reduction
						A__							:					List[str]       =	ctc_zero_infinity

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






					@property
					def 						__A    (				self    ):
						return functools.reduce(operator.mul					, self.conv_stride					, 1    )






import warnings

from ...utils import logging
from .image_processing_poolformer import PoolFormerImageProcessor


A_ :				Union[str, Any]						 =    logging.get_logger(__name__)



class 					_a		(__magic_name__       ):


					'''simple docstring'''






					def __init__(				self					, *A__					, **A__    ):
						warnings.warn(
						    """The class PoolFormerFeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
						    """ Please use PoolFormerImageProcessor instead."""					, A__					, )
						super().__init__(*A__					, **A__    )



