"""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


UpperCAmelCase__     						=  logging.get_logger(__name__)

UpperCAmelCase__     						=  {
    """microsoft/beit-base-patch16-224-pt22k""": (
        """https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json"""
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}


class 				a (						lowerCAmelCase_      ):
    _snake_case   :     Optional[int]   							=							'beit'


    def __init__(    self		:     Optional[Any]      , __lowerCAmelCase		:     Any=8192      , __lowerCAmelCase		:     Tuple=768      , __lowerCAmelCase		:     str=12      , __lowerCAmelCase		:     Optional[int]=12      , __lowerCAmelCase		:     Union[str, Any]=3072      , __lowerCAmelCase		:     List[str]="gelu"      , __lowerCAmelCase		:     Dict=0.0      , __lowerCAmelCase		:     Tuple=0.0      , __lowerCAmelCase		:     Optional[int]=0.02      , __lowerCAmelCase		:     int=1e-1_2      , __lowerCAmelCase		:     Optional[Any]=224      , __lowerCAmelCase		:     Union[str, Any]=16      , __lowerCAmelCase		:     Dict=3      , __lowerCAmelCase		:     Optional[int]=False      , __lowerCAmelCase		:     Any=False      , __lowerCAmelCase		:     Optional[int]=False      , __lowerCAmelCase		:     Optional[int]=False      , __lowerCAmelCase		:     Optional[int]=0.1      , __lowerCAmelCase		:     int=0.1      , __lowerCAmelCase		:     Dict=True      , __lowerCAmelCase		:     Optional[int]=[3, 5, 7, 11]      , __lowerCAmelCase		:     Tuple=[1, 2, 3, 6]      , __lowerCAmelCase		:     Union[str, Any]=True      , __lowerCAmelCase		:     Optional[int]=0.4      , __lowerCAmelCase		:     List[Any]=256      , __lowerCAmelCase		:     List[str]=1      , __lowerCAmelCase		:     List[str]=False      , __lowerCAmelCase		:     List[Any]=255      , **__lowerCAmelCase		:     List[str]      , ):
      super().__init__(**__lowerCAmelCase    )

      _UpperCAmelCase         =					vocab_size
      _UpperCAmelCase         =					hidden_size
      _UpperCAmelCase         =					num_hidden_layers
      _UpperCAmelCase         =					num_attention_heads
      _UpperCAmelCase         =					intermediate_size
      _UpperCAmelCase         =					hidden_act
      _UpperCAmelCase         =					hidden_dropout_prob
      _UpperCAmelCase         =					attention_probs_dropout_prob
      _UpperCAmelCase         =					initializer_range
      _UpperCAmelCase         =					layer_norm_eps

      _UpperCAmelCase         =					image_size
      _UpperCAmelCase         =					patch_size
      _UpperCAmelCase         =					num_channels
      _UpperCAmelCase         =					use_mask_token
      _UpperCAmelCase         =					use_absolute_position_embeddings
      _UpperCAmelCase         =					use_relative_position_bias
      _UpperCAmelCase         =					use_shared_relative_position_bias
      _UpperCAmelCase         =					layer_scale_init_value
      _UpperCAmelCase         =					drop_path_rate
      _UpperCAmelCase         =					use_mean_pooling
      # decode head attributes (semantic segmentation)
      _UpperCAmelCase         =					out_indices
      _UpperCAmelCase         =					pool_scales
      # auxiliary head attributes (semantic segmentation)
      _UpperCAmelCase         =					use_auxiliary_head
      _UpperCAmelCase         =					auxiliary_loss_weight
      _UpperCAmelCase         =					auxiliary_channels
      _UpperCAmelCase         =					auxiliary_num_convs
      _UpperCAmelCase         =					auxiliary_concat_input
      _UpperCAmelCase         =					semantic_loss_ignore_index



class 				a (						lowerCAmelCase_      ):
    _snake_case   :     List[Any]   							=							version.parse('1.11'      )


    @property
    def    lowerCAmelCase_     (    self		:     Tuple    ):
      return OrderedDict(
          [
              ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
          ]    )


    @property
    def    lowerCAmelCase_     (    self		:     Optional[Any]    ):
      return 1e-4

"""simple docstring"""


from collections import OrderedDict
from typing import List, Mapping

from packaging import version

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


UpperCAmelCase__     						=  logging.get_logger(__name__)

UpperCAmelCase__     						=  {
    """google/efficientnet-b7""": """https://huggingface.co/google/efficientnet-b7/resolve/main/config.json""",
}


class 				a (						lowerCAmelCase_      ):
    _snake_case   :     Any   							=							'efficientnet'


    def __init__(    self		:     Any      , __lowerCAmelCase		:     int = 3      , __lowerCAmelCase		:     int = 600      , __lowerCAmelCase		:     float = 2.0      , __lowerCAmelCase		:     float = 3.1      , __lowerCAmelCase		:     int = 8      , __lowerCAmelCase		:     List[int] = [3, 3, 5, 3, 5, 5, 3]      , __lowerCAmelCase		:     List[int] = [32, 16, 24, 40, 80, 112, 192]      , __lowerCAmelCase		:     List[int] = [16, 24, 40, 80, 112, 192, 320]      , __lowerCAmelCase		:     List[int] = []      , __lowerCAmelCase		:     List[int] = [1, 2, 2, 2, 1, 2, 1]      , __lowerCAmelCase		:     List[int] = [1, 2, 2, 3, 3, 4, 1]      , __lowerCAmelCase		:     List[int] = [1, 6, 6, 6, 6, 6, 6]      , __lowerCAmelCase		:     float = 0.25      , __lowerCAmelCase		:     str = "swish"      , __lowerCAmelCase		:     int = 2560      , __lowerCAmelCase		:     str = "mean"      , __lowerCAmelCase		:     float = 0.02      , __lowerCAmelCase		:     float = 0.001      , __lowerCAmelCase		:     float = 0.99      , __lowerCAmelCase		:     float = 0.5      , __lowerCAmelCase		:     float = 0.2      , **__lowerCAmelCase		:     List[Any]      , ):
      super().__init__(**__lowerCAmelCase    )

      _UpperCAmelCase         =					num_channels
      _UpperCAmelCase         =					image_size
      _UpperCAmelCase         =					width_coefficient
      _UpperCAmelCase         =					depth_coefficient
      _UpperCAmelCase         =					depth_divisor
      _UpperCAmelCase         =					kernel_sizes
      _UpperCAmelCase         =					in_channels
      _UpperCAmelCase         =					out_channels
      _UpperCAmelCase         =					depthwise_padding
      _UpperCAmelCase         =					strides
      _UpperCAmelCase         =					num_block_repeats
      _UpperCAmelCase         =					expand_ratios
      _UpperCAmelCase         =					squeeze_expansion_ratio
      _UpperCAmelCase         =					hidden_act
      _UpperCAmelCase         =					hidden_dim
      _UpperCAmelCase         =					pooling_type
      _UpperCAmelCase         =					initializer_range
      _UpperCAmelCase         =					batch_norm_eps
      _UpperCAmelCase         =					batch_norm_momentum
      _UpperCAmelCase         =					dropout_rate
      _UpperCAmelCase         =					drop_connect_rate
      _UpperCAmelCase         =					sum(__lowerCAmelCase    ) * 4



class 				a (						lowerCAmelCase_      ):
    _snake_case   :     Dict   							=							version.parse('1.11'      )


    @property
    def    lowerCAmelCase_     (    self		:     Any    ):
      return OrderedDict(
          [
              ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
          ]    )


    @property
    def    lowerCAmelCase_     (    self		:     int    ):
      return 1e-5
