






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


a_							=			logging.get_logger(__name__)

a_							=			{
    '''kssteven/ibert-roberta-base''': '''https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json''',
    '''kssteven/ibert-roberta-large''': '''https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json''',
    '''kssteven/ibert-roberta-large-mnli''': (
        '''https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json'''
    ),
}


class    lowercase__   (	__snake_case		):
	a_   			="""ibert"""

	def __init__(							self						,			__UpperCAmelCase=30522						,			__UpperCAmelCase=768						,			__UpperCAmelCase=12						,			__UpperCAmelCase=12						,			__UpperCAmelCase=3072						,			__UpperCAmelCase="gelu"						,			__UpperCAmelCase=0.1						,			__UpperCAmelCase=0.1						,			__UpperCAmelCase=512						,			__UpperCAmelCase=2						,			__UpperCAmelCase=0.02						,			__UpperCAmelCase=1E-1_2						,			__UpperCAmelCase=1						,			__UpperCAmelCase=0						,			__UpperCAmelCase=2						,			__UpperCAmelCase="absolute"						,			__UpperCAmelCase=False						,			__UpperCAmelCase="none"						,			**__UpperCAmelCase						,			)->    Optional[int]:







							'''simple docstring'''





							super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE						,			bos_token_id=__SCREAMING_SNAKE_CASE						,			eos_token_id=__SCREAMING_SNAKE_CASE						,			**__SCREAMING_SNAKE_CASE				)

							lowerCAmelCase__       					=  vocab_size
							lowerCAmelCase__       					=  hidden_size
							lowerCAmelCase__       					=  num_hidden_layers
							lowerCAmelCase__       					=  num_attention_heads
							lowerCAmelCase__       					=  hidden_act
							lowerCAmelCase__       					=  intermediate_size
							lowerCAmelCase__       					=  hidden_dropout_prob
							lowerCAmelCase__       					=  attention_probs_dropout_prob
							lowerCAmelCase__       					=  max_position_embeddings
							lowerCAmelCase__       					=  type_vocab_size
							lowerCAmelCase__       					=  initializer_range
							lowerCAmelCase__       					=  layer_norm_eps
							lowerCAmelCase__       					=  position_embedding_type
							lowerCAmelCase__       					=  quant_mode
							lowerCAmelCase__       					=  force_dequant





class    lowercase__   (	__snake_case		):

	@property
	def 						UpperCAmelCase     (							self				)->    Mapping[str, Mapping[int, str]]:







							'''simple docstring'''





							if self.task == "multiple-choice":
													lowerCAmelCase__       					=  {0: "batch", 1: "choice", 2: "sequence"}
							else:
													lowerCAmelCase__       					=  {0: "batch", 1: "sequence"}
							return OrderedDict(
							    [
							        ("input_ids", dynamic_axis),
							        ("attention_mask", dynamic_axis),
							    ]				)














"""simple docstring"""





from cva import destroyAllWindows, imread, imshow, waitKey







def      lowerCamelCase__       (							_lowerCamelCase       :		Tuple )      ->				Dict:
  # getting number of pixels in the image
  lowerCamelCase_     ,	lowerCamelCase_         =						img.shape[0], img.shape[1]

  # converting each pixel's color to its negative
  for i in range(_lowerCamelCase ):
    for j in range(_lowerCamelCase ):
      lowerCamelCase_         =						[255, 255, 255] - img[i][j]

  return img


if __name__ == "__main__":
  # read original image
  _SCREAMING_SNAKE_CASE					:				List[Any]					    =						imread('''image_data/lena.jpg''', 1)

  # convert to its negative
  _SCREAMING_SNAKE_CASE					:				List[Any]					    =						convert_to_negative(img)

  # show result image
  imshow('''negative of original image''', img)
  waitKey(0)
  destroyAllWindows()




