'''simple docstring'''




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


_lowercase		:				Any	       =		logging.get_logger(__name__)

_lowercase		:				int	       =		{
    "speechbrain/m-ctc-t-large": "https://huggingface.co/speechbrain/m-ctc-t-large/resolve/main/config.json",
    # See all M-CTC-T models at https://huggingface.co/models?filter=mctct
}





class 					__magic_name__		(					a__):
			UpperCamelCase__       = '''mctct'''







			def __init__(			self       :						Tuple       ,    lowercase_       :						Any=8065       ,    lowercase_       :						int=1536       ,    lowercase_       :						Tuple=36       ,    lowercase_       :						int=6144       ,    lowercase_       :						Optional[int]=4       ,    lowercase_       :						List[Any]=384       ,    lowercase_       :						Optional[Any]=920       ,    lowercase_       :						int=1E-5       ,    lowercase_       :						Tuple=0.3       ,    lowercase_       :						List[str]="relu"       ,    lowercase_       :						Any=0.02       ,    lowercase_       :						Optional[Any]=0.3       ,    lowercase_       :						int=0.3       ,    lowercase_       :						int=1       ,    lowercase_       :						Dict=0       ,    lowercase_       :						List[str]=2       ,    lowercase_       :						Dict=1       ,    lowercase_       :						List[Any]=0.3       ,    lowercase_       :						List[Any]=1       ,    lowercase_       :						Optional[Any]=(7,)       ,    lowercase_       :						List[str]=(3,)       ,    lowercase_       :						List[str]=80       ,    lowercase_       :						List[Any]=1       ,    lowercase_       :						Union[str, Any]=None       ,    lowercase_       :						Union[str, Any]="sum"       ,    lowercase_       :						Tuple=False       ,    **lowercase_       :						Optional[Any]       ,    ):
										super().__init__(**_A       ,    pad_token_id=_A       ,    bos_token_id=_A       ,    eos_token_id=_A					)
										lowercase_      :    List[Any]       		= vocab_size
										lowercase_      :    Optional[Any]       		= hidden_size
										lowercase_      :    List[str]       		= num_hidden_layers
										lowercase_      :    Union[str, Any]       		= intermediate_size
										lowercase_      :    List[str]       		= num_attention_heads
										lowercase_      :    Optional[Any]       		= attention_head_dim
										lowercase_      :    Optional[int]       		= max_position_embeddings
										lowercase_      :    List[str]       		= layer_norm_eps
										lowercase_      :    Dict       		= layerdrop
										lowercase_      :    Optional[Any]       		= hidden_act
										lowercase_      :    Tuple       		= initializer_range
										lowercase_      :    Optional[int]       		= hidden_dropout_prob
										lowercase_      :    Dict       		= attention_probs_dropout_prob
										lowercase_      :    Union[str, Any]       		= pad_token_id
										lowercase_      :    Any       		= bos_token_id
										lowercase_      :    Union[str, Any]       		= eos_token_id
										lowercase_      :    str       		= conv_glu_dim
										lowercase_      :    int       		= conv_dropout
										lowercase_      :    str       		= num_conv_layers
										lowercase_      :    Union[str, Any]       		= input_feat_per_channel
										lowercase_      :    Any       		= input_channels
										lowercase_      :    Optional[int]       		= conv_channels
										lowercase_      :    str       		= ctc_loss_reduction
										lowercase_      :    str       		= ctc_zero_infinity

										# prevents config testing fail with exporting to json
										lowercase_      :    Any       		= list(_A					)
										lowercase_      :    List[Any]       		= list(_A					)

										if len(self.conv_kernel					) != self.num_conv_layers:
																	raise ValueError(
																	    """Configuration for convolutional module is incorrect. """
																	    """It is required that `len(config.conv_kernel)` == `config.num_conv_layers` """
																	    f'''but is `len(config.conv_kernel) = {len(self.conv_kernel					)}`, '''
																	    f'''`config.num_conv_layers = {self.num_conv_layers}`.'''					)






'''simple docstring'''




import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import ClassLabel, Features, Image
from .base import TaskTemplate





@dataclass(frozen=_UpperCAmelCase)
class 					__magic_name__		(					_UpperCAmelCase):
			UpperCamelCase__       = field(default='''image-classification''',  metadata={'''include_in_asdict_even_if_is_default''': True})
			UpperCamelCase__       = Features({'''image''': Image()})
			UpperCamelCase__       = Features({'''labels''': ClassLabel})
			UpperCamelCase__       = "image"
			UpperCamelCase__       = "labels"







			def 			SCREAMING_SNAKE_CASE_  (			self       :						Tuple       ,    lowercase_       :						str					):
										if self.label_column not in features:
																	raise ValueError(f'''Column {self.label_column} is not present in features.'''					)
										if not isinstance(features[self.label_column]       ,    lowercase_					):
																	raise ValueError(f'''Column {self.label_column} is not a ClassLabel.'''					)
										lowercase_      :    List[str]       		= copy.deepcopy(self					)
										lowercase_      :    List[str]       		= self.label_schema.copy()
										lowercase_      :    List[Any]       		= features[self.label_column]
										lowercase_      :    Optional[Any]       		= label_schema
										return task_template







			@property
			def 			SCREAMING_SNAKE_CASE_  (			self       :						int					):
										return {
										    self.image_column: "image",
										    self.label_column: "labels",
										}





