






"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import is_detectrona_available, logging


A_			: str				=			logging.get_logger(__name__)

A_			: int				=			{
    "layoutlmv2-base-uncased": "https://huggingface.co/microsoft/layoutlmv2-base-uncased/resolve/main/config.json",
    "layoutlmv2-large-uncased": "https://huggingface.co/microsoft/layoutlmv2-large-uncased/resolve/main/config.json",
    # See all LayoutLMv2 models at https://huggingface.co/models?filter=layoutlmv2
}

# soft dependency
if is_detectrona_available():
      import detectrona



class 		a_      (	snake_case_ ):







      '''simple docstring'''

      lowerCamelCase__       :				List[str] =	'layoutlmv2'




      def __init__(self,     lowerCamelCase_=3_0_5_2_2,     lowerCamelCase_=7_6_8,     lowerCamelCase_=1_2,     lowerCamelCase_=1_2,     lowerCamelCase_=3_0_7_2,     lowerCamelCase_="gelu",     lowerCamelCase_=0.1,     lowerCamelCase_=0.1,     lowerCamelCase_=5_1_2,     lowerCamelCase_=2,     lowerCamelCase_=0.02,     lowerCamelCase_=1e-12,     lowerCamelCase_=0,     lowerCamelCase_=1_0_2_4,     lowerCamelCase_=1_2_8,     lowerCamelCase_=3_2,     lowerCamelCase_=True,     lowerCamelCase_=2_5_6,     lowerCamelCase_=6_4,     lowerCamelCase_=True,     lowerCamelCase_=[7, 7, 2_5_6],     lowerCamelCase_=1_2_8,     lowerCamelCase_=1_2_8,     lowerCamelCase_=True,     lowerCamelCase_=True,     lowerCamelCase_=False,     lowerCamelCase_=None,     **lowerCamelCase_,     ):

       '''simple docstring'''



       super().__init__(
           vocab_size=lowerCamelCase_,     hidden_size=lowerCamelCase_,     num_hidden_layers=lowerCamelCase_,     num_attention_heads=lowerCamelCase_,     intermediate_size=lowerCamelCase_,     hidden_act=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_,     pad_token_id=lowerCamelCase_,     **lowerCamelCase_,     )
       lowerCamelCase__     :			Union[str, Any]     				=						max_ad_position_embeddings
       lowerCamelCase__     :			Dict     				=						max_rel_pos
       lowerCamelCase__     :			Any     				=						rel_pos_bins
       lowerCamelCase__     :			str     				=						fast_qkv
       lowerCamelCase__     :			Dict     				=						max_rel_ad_pos
       lowerCamelCase__     :			Any     				=						rel_ad_pos_bins
       lowerCamelCase__     :			str     				=						convert_sync_batchnorm
       lowerCamelCase__     :			Union[str, Any]     				=						image_feature_pool_shape
       lowerCamelCase__     :			Tuple     				=						coordinate_size
       lowerCamelCase__     :			Union[str, Any]     				=						shape_size
       lowerCamelCase__     :			Optional[Any]     				=						has_relative_attention_bias
       lowerCamelCase__     :			List[str]     				=						has_spatial_attention_bias
       lowerCamelCase__     :			Dict     				=						has_visual_segment_embedding
       lowerCamelCase__     :			Optional[Any]     				=						(
           detectrona_config_args if detectrona_config_args is not None else self.get_default_detectrona_config()
       )




      @classmethod
      def 			a__							(self					):

       '''simple docstring'''



       return {
           "MODEL.MASK_ON": True,
           "MODEL.PIXEL_STD": [57.375, 57.120, 58.395],
           "MODEL.BACKBONE.NAME": "build_resnet_fpn_backbone",
           "MODEL.FPN.IN_FEATURES": ["res2", "res3", "res4", "res5"],
           "MODEL.ANCHOR_GENERATOR.SIZES": [[3_2], [6_4], [1_2_8], [2_5_6], [5_1_2]],
           "MODEL.RPN.IN_FEATURES": ["p2", "p3", "p4", "p5", "p6"],
           "MODEL.RPN.PRE_NMS_TOPK_TRAIN": 2_0_0_0,
           "MODEL.RPN.PRE_NMS_TOPK_TEST": 1_0_0_0,
           "MODEL.RPN.POST_NMS_TOPK_TRAIN": 1_0_0_0,
           "MODEL.POST_NMS_TOPK_TEST": 1_0_0_0,
           "MODEL.ROI_HEADS.NAME": "StandardROIHeads",
           "MODEL.ROI_HEADS.NUM_CLASSES": 5,
           "MODEL.ROI_HEADS.IN_FEATURES": ["p2", "p3", "p4", "p5"],
           "MODEL.ROI_BOX_HEAD.NAME": "FastRCNNConvFCHead",
           "MODEL.ROI_BOX_HEAD.NUM_FC": 2,
           "MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION": 1_4,
           "MODEL.ROI_MASK_HEAD.NAME": "MaskRCNNConvUpsampleHead",
           "MODEL.ROI_MASK_HEAD.NUM_CONV": 4,
           "MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION": 7,
           "MODEL.RESNETS.DEPTH": 1_0_1,
           "MODEL.RESNETS.SIZES": [[3_2], [6_4], [1_2_8], [2_5_6], [5_1_2]],
           "MODEL.RESNETS.ASPECT_RATIOS": [[0.5, 1.0, 2.0]],
           "MODEL.RESNETS.OUT_FEATURES": ["res2", "res3", "res4", "res5"],
           "MODEL.RESNETS.NUM_GROUPS": 3_2,
           "MODEL.RESNETS.WIDTH_PER_GROUP": 8,
           "MODEL.RESNETS.STRIDE_IN_1X1": False,
       }





      def 			a__							(self					):

       '''simple docstring'''



       lowerCamelCase__     :			int     				=						detectrona.config.get_cfg()
       for k, v in self.detectrona_config_args.items():
        lowerCamelCase__     :			str     				=						k.split('.'					)
        lowerCamelCase__     :			Any     				=						detectrona_config
        for attribute in attributes[:-1]:
         lowerCamelCase__     :			Optional[Any]     				=						getattr(lowerCamelCase_,     lowerCamelCase_					)
        setattr(lowerCamelCase_,     attributes[-1],     lowerCamelCase_					)

       return detectrona_config









"""simple docstring"""
def        lowerCamelCase_  (						_lowerCamelCase				):
 return 1 if input_a == 0 else 0






def        lowerCamelCase_  (						):
 assert not_gate(0				) == 1
 assert not_gate(1				) == 0


if __name__ == "__main__":
      print(not_gate(0))
      print(not_gate(1))

