



"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import is_detectrona_available, logging


lowerCamelCase				:     Tuple								=  logging.get_logger(__name__)

lowerCamelCase				:     Any								=  {
    """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    __snake_case(					__A       ):
    _A       = '''layoutlmv2'''




    def __init__(   self    ,							A_=30_522    ,							A_=768    ,							A_=12    ,							A_=12    ,							A_=3_072    ,							A_="gelu"    ,							A_=0.1    ,							A_=0.1    ,							A_=512    ,							A_=2    ,							A_=0.02    ,							A_=1e-12    ,							A_=0    ,							A_=1_024    ,							A_=128    ,							A_=32    ,							A_=True    ,							A_=256    ,							A_=64    ,							A_=True    ,							A_=[7, 7, 256]    ,							A_=128    ,							A_=128    ,							A_=True    ,							A_=True    ,							A_=False    ,							A_=None    ,							**A_    ,							):





      '''simple docstring'''



      super().__init__(
          vocab_size=A_    ,							hidden_size=A_    ,							num_hidden_layers=A_    ,							num_attention_heads=A_    ,							intermediate_size=A_    ,							hidden_act=A_    ,							hidden_dropout_prob=A_    ,							attention_probs_dropout_prob=A_    ,							max_position_embeddings=A_    ,							type_vocab_size=A_    ,							initializer_range=A_    ,							layer_norm_eps=A_    ,							pad_token_id=A_    ,							**A_    ,							)
      _SCREAMING_SNAKE_CASE        =			max_ad_position_embeddings
      _SCREAMING_SNAKE_CASE        =			max_rel_pos
      _SCREAMING_SNAKE_CASE        =			rel_pos_bins
      _SCREAMING_SNAKE_CASE        =			fast_qkv
      _SCREAMING_SNAKE_CASE        =			max_rel_ad_pos
      _SCREAMING_SNAKE_CASE        =			rel_ad_pos_bins
      _SCREAMING_SNAKE_CASE        =			convert_sync_batchnorm
      _SCREAMING_SNAKE_CASE        =			image_feature_pool_shape
      _SCREAMING_SNAKE_CASE        =			coordinate_size
      _SCREAMING_SNAKE_CASE        =			shape_size
      _SCREAMING_SNAKE_CASE        =			has_relative_attention_bias
      _SCREAMING_SNAKE_CASE        =			has_spatial_attention_bias
      _SCREAMING_SNAKE_CASE        =			has_visual_segment_embedding
      _SCREAMING_SNAKE_CASE        =			(
          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": [[32], [64], [128], [256], [512]],
          "MODEL.RPN.IN_FEATURES": ["p2", "p3", "p4", "p5", "p6"],
          "MODEL.RPN.PRE_NMS_TOPK_TRAIN": 2_000,
          "MODEL.RPN.PRE_NMS_TOPK_TEST": 1_000,
          "MODEL.RPN.POST_NMS_TOPK_TRAIN": 1_000,
          "MODEL.POST_NMS_TOPK_TEST": 1_000,
          "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": 14,
          "MODEL.ROI_MASK_HEAD.NAME": "MaskRCNNConvUpsampleHead",
          "MODEL.ROI_MASK_HEAD.NUM_CONV": 4,
          "MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION": 7,
          "MODEL.RESNETS.DEPTH": 101,
          "MODEL.RESNETS.SIZES": [[32], [64], [128], [256], [512]],
          "MODEL.RESNETS.ASPECT_RATIOS": [[0.5, 1.0, 2.0]],
          "MODEL.RESNETS.OUT_FEATURES": ["res2", "res3", "res4", "res5"],
          "MODEL.RESNETS.NUM_GROUPS": 32,
          "MODEL.RESNETS.WIDTH_PER_GROUP": 8,
          "MODEL.RESNETS.STRIDE_IN_1X1": False,
      }




    def   A   (   self			):





      '''simple docstring'''



      _SCREAMING_SNAKE_CASE        =			detectrona.config.get_cfg()
      for k, v in self.detectrona_config_args.items():
        _SCREAMING_SNAKE_CASE        =			k.split('''.'''			)
        _SCREAMING_SNAKE_CASE        =			detectrona_config
        for attribute in attributes[:-1]:
          _SCREAMING_SNAKE_CASE        =			getattr(A_    ,							A_			)
        setattr(A_    ,							attributes[-1]    ,							A_			)

      return detectrona_config





"""simple docstring"""






from math import gcd


def 							A__ (     UpperCamelCase__ = 12_000    ):


  '''simple docstring'''


  _SCREAMING_SNAKE_CASE        =			0
  for d in range(max_d + 1    ):
    for n in range(d // 3 + 1       ,							(d + 1) // 2    ):
      if gcd(UpperCamelCase__       ,							UpperCamelCase__    ) == 1:
        fractions_number += 1
  return fractions_number


if __name__ == "__main__":
    print(F'''{solution() = }''')
