

"""simple docstring"""






from ...configuration_utils import PretrainedConfig


snake_case_   :   Tuple        =       {
    """google/tapas-base-finetuned-sqa""": (
        """https://huggingface.co/google/tapas-base-finetuned-sqa/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-wtq""": (
        """https://huggingface.co/google/tapas-base-finetuned-wtq/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-wikisql-supervised""": (
        """https://huggingface.co/google/tapas-base-finetuned-wikisql-supervised/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-tabfact""": (
        """https://huggingface.co/google/tapas-base-finetuned-tabfact/resolve/main/config.json"""
    ),
}







class       snake_case__  ( lowerCAmelCase_     ):
			SCREAMING_SNAKE_CASE__     				=						'''tapas'''







			def __init__(			self			: List[Any]			,  lowercase			: Dict=3_05_22			,  lowercase			: List[str]=7_68			,  lowercase			: Optional[Any]=12			,  lowercase			: int=12			,  lowercase			: Dict=30_72			,  lowercase			: str="gelu"			,  lowercase			: Any=0.1			,  lowercase			: Optional[int]=0.1			,  lowercase			: Optional[int]=10_24			,  lowercase			: str=[3, 2_56, 2_56, 2, 2_56, 2_56, 10]			,  lowercase			: Optional[int]=0.0_2			,  lowercase			: Optional[Any]=1E-12			,  lowercase			: str=0			,  lowercase			: Union[str, Any]=1_0.0			,  lowercase			: Dict=0			,  lowercase			: Tuple=1.0			,  lowercase			: Dict=None			,  lowercase			: Tuple=1.0			,  lowercase			: Tuple=False			,  lowercase			: Dict=None			,  lowercase			: str=1.0			,  lowercase			: int=1.0			,  lowercase			: str=False			,  lowercase			: str=False			,  lowercase			: Optional[int]="ratio"			,  lowercase			: Tuple=None			,  lowercase			: Optional[Any]=None			,  lowercase			: Tuple=64			,  lowercase			: List[Any]=32			,  lowercase			: List[Any]=False			,  lowercase			: Dict=True			,  lowercase			: str=False			,  lowercase			: Any=False			,  lowercase			: str=True			,  lowercase			: str=False			,  lowercase			: Optional[Any]=None			,  lowercase			: Optional[Any]=None			,  **lowercase			: str			,  ):





								'''simple docstring'''



								super().__init__(pad_token_id=lowercase			,  **lowercase  )

								# BERT hyperparameters (with updated max_position_embeddings and type_vocab_sizes)
								UpperCAmelCase			:   List[Any]      =				vocab_size
								UpperCAmelCase			:   List[str]      =				hidden_size
								UpperCAmelCase			:   Union[str, Any]      =				num_hidden_layers
								UpperCAmelCase			:   List[Any]      =				num_attention_heads
								UpperCAmelCase			:   Union[str, Any]      =				hidden_act
								UpperCAmelCase			:   Tuple      =				intermediate_size
								UpperCAmelCase			:   int      =				hidden_dropout_prob
								UpperCAmelCase			:   List[str]      =				attention_probs_dropout_prob
								UpperCAmelCase			:   Optional[int]      =				max_position_embeddings
								UpperCAmelCase			:   str      =				type_vocab_sizes
								UpperCAmelCase			:   Any      =				initializer_range
								UpperCAmelCase			:   Dict      =				layer_norm_eps

								# Fine-tuning task hyperparameters
								UpperCAmelCase			:   Tuple      =				positive_label_weight
								UpperCAmelCase			:   Dict      =				num_aggregation_labels
								UpperCAmelCase			:   Union[str, Any]      =				aggregation_loss_weight
								UpperCAmelCase			:   Optional[int]      =				use_answer_as_supervision
								UpperCAmelCase			:   Tuple      =				answer_loss_importance
								UpperCAmelCase			:   Union[str, Any]      =				use_normalized_answer_loss
								UpperCAmelCase			:   Union[str, Any]      =				huber_loss_delta
								UpperCAmelCase			:   List[str]      =				temperature
								UpperCAmelCase			:   Optional[Any]      =				aggregation_temperature
								UpperCAmelCase			:   List[str]      =				use_gumbel_for_cells
								UpperCAmelCase			:   List[str]      =				use_gumbel_for_aggregation
								UpperCAmelCase			:   Any      =				average_approximation_function
								UpperCAmelCase			:   Optional[Any]      =				cell_selection_preference
								UpperCAmelCase			:   Optional[Any]      =				answer_loss_cutoff
								UpperCAmelCase			:   Optional[int]      =				max_num_rows
								UpperCAmelCase			:   Dict      =				max_num_columns
								UpperCAmelCase			:   Optional[int]      =				average_logits_per_cell
								UpperCAmelCase			:   List[str]      =				select_one_column
								UpperCAmelCase			:   Optional[Any]      =				allow_empty_column_selection
								UpperCAmelCase			:   int      =				init_cell_selection_weights_to_zero
								UpperCAmelCase			:   Any      =				reset_position_index_per_cell
								UpperCAmelCase			:   Any      =				disable_per_token_loss

								# Aggregation hyperparameters
								UpperCAmelCase			:   Dict      =				aggregation_labels
								UpperCAmelCase			:   Tuple      =				no_aggregation_label_index

								if isinstance(self.aggregation_labels			,  lowercase  ):
													UpperCAmelCase			:   str      =				{int(lowercase  ): v for k, v in aggregation_labels.items()}





"""simple docstring"""






def   lowercase_	(    _lowercase       :		int							,      _lowercase       :		int	):




					'''simple docstring'''






					return int(input_a == input_a == 0	)



def   lowercase_	(    ):




					'''simple docstring'''






					print("Truth Table of NOR Gate:"	)
					print("|   Input 1   |  Input 2  | Output |"	)
					print(F"""|      0      |    0      |  {nor_gate(0							,      0	)}     |"""	)
					print(F"""|      0      |    1      |  {nor_gate(0							,      1	)}     |"""	)
					print(F"""|      1      |    0      |  {nor_gate(1							,      0	)}     |"""	)
					print(F"""|      1      |    1      |  {nor_gate(1							,      1	)}     |"""	)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()


