



'''simple docstring'''





from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


lowercase_		       =  {
    "susnato/ernie-m-base_pytorch": "https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json",
    "susnato/ernie-m-large_pytorch": "https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json",
}






class __A			(  A						):



 '''simple docstring'''







 __lowerCamelCase    :       Optional[int]          =       'ernie_m'
 __lowerCamelCase    :       Dict[str, str]          =       {"dropout": "classifier_dropout", "num_classes": "num_labels"}



 def __init__(self ,   A = 250_002 ,   A = 768 ,   A = 12 ,   A = 12 ,   A = 3_072 ,   A = "gelu" ,   A = 0.1 ,   A = 0.1 ,   A = 514 ,   A = 0.02 ,   A = 1 ,   A = 1E-05 ,   A=None ,   A=False ,   A=0.0 ,   **A ,   )    ->     Optional[int]:


      """simple docstring"""



      super().__init__(pad_token_id=A ,   **A       )
      _a      =  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      =  initializer_range
      _a      =  layer_norm_eps
      _a      =  classifier_dropout
      _a      =  is_decoder
      _a      =  act_dropout








'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


lowercase_		       =  logging.get_logger(__name__)

lowercase_		       =  {
    "microsoft/resnet-50": "https://huggingface.co/microsoft/resnet-50/blob/main/config.json",
}






class __A			(  A   ,   A						):



 '''simple docstring'''







 __lowerCamelCase    :       Tuple          =       'resnet'
 __lowerCamelCase    :       Any          =       ['basic', 'bottleneck']



 def __init__(self ,   A=3 ,   A=64 ,   A=[256, 512, 1_024, 2_048] ,   A=[3, 4, 6, 3] ,   A="bottleneck" ,   A="relu" ,   A=False ,   A=None ,   A=None ,   **A ,   )    ->     Dict:


      """simple docstring"""



      super().__init__(**A       )
      if layer_type not in self.layer_types:
           raise ValueError(f'''layer_type={layer_type} is not one of {','.join(self.layer_types       )}'''       )
      _a      =  num_channels
      _a      =  embedding_size
      _a      =  hidden_sizes
      _a      =  depths
      _a      =  layer_type
      _a      =  hidden_act
      _a      =  downsample_in_first_stage
      _a      =  ['''stem'''] + [f'''stage{idx}''' for idx in range(1 ,   len(A       ) + 1       )]
      _a  ,    _a      =  get_aligned_output_features_output_indices(
          out_features=A ,   out_indices=A ,   stage_names=self.stage_names       )






class __A			(  A						):



 '''simple docstring'''







 __lowerCamelCase    :       Any          =       version.parse('1.11'						)



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


      """simple docstring"""



      return OrderedDict(
          [
              ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
          ]       )



 @property
 def 					a__  (self       )    ->     float:


      """simple docstring"""



      return 1E-3



