
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


lowercase__          =logging.get_logger(__name__)

lowercase__          ={
    'facebook/data2vec-vision-base-ft': (
        'https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json'
    ),
}



class 		UpperCamelCase__  (	__lowercase   ):
   _SCREAMING_SNAKE_CASE				:							str     	=				"data2vec-vision"
   def __init__(self			: Optional[Any] ,    snake_case_			: List[Any]=7_6_8 ,    snake_case_			: Tuple=1_2 ,    snake_case_			: Any=1_2 ,    snake_case_			: Optional[int]=3_0_7_2 ,    snake_case_			: Tuple="gelu" ,    snake_case_			: Dict=0.0 ,    snake_case_			: Tuple=0.0 ,    snake_case_			: Dict=0.02 ,    snake_case_			: Optional[int]=1E-12 ,    snake_case_			: int=2_2_4 ,    snake_case_			: Optional[Any]=1_6 ,    snake_case_			: List[str]=3 ,    snake_case_			: Tuple=False ,    snake_case_			: Any=False ,    snake_case_			: Optional[int]=False ,    snake_case_			: str=False ,    snake_case_			: Any=0.1 ,    snake_case_			: int=0.1 ,    snake_case_			: Optional[Any]=True ,    snake_case_			: Union[str, Any]=[3, 5, 7, 1_1] ,    snake_case_			: Any=[1, 2, 3, 6] ,    snake_case_			: int=True ,    snake_case_			: Optional[Any]=0.4 ,    snake_case_			: Tuple=2_5_6 ,    snake_case_			: Optional[Any]=1 ,    snake_case_			: List[Any]=False ,    snake_case_			: Union[str, Any]=2_5_5 ,    **snake_case_			: int ,    ):
          super().__init__(**snake_case_       )

          __a			:  List[str]		    =  hidden_size
          __a			:  List[str]		    =  num_hidden_layers
          __a			:  Any		    =  num_attention_heads
          __a			:  List[str]		    =  intermediate_size
          __a			:  Optional[int]		    =  hidden_act
          __a			:  int		    =  hidden_dropout_prob
          __a			:  List[str]		    =  attention_probs_dropout_prob
          __a			:  Any		    =  initializer_range
          __a			:  str		    =  layer_norm_eps

          __a			:  List[str]		    =  image_size
          __a			:  Optional[Any]		    =  patch_size
          __a			:  int		    =  num_channels
          __a			:  Tuple		    =  use_mask_token
          __a			:  List[Any]		    =  use_absolute_position_embeddings
          __a			:  Tuple		    =  use_relative_position_bias
          __a			:  Any		    =  use_shared_relative_position_bias
          __a			:  Dict		    =  layer_scale_init_value
          __a			:  int		    =  drop_path_rate
          __a			:  Optional[int]		    =  use_mean_pooling
          # decode head attributes (semantic segmentation)
          __a			:  Union[str, Any]		    =  out_indices
          __a			:  Union[str, Any]		    =  pool_scales
          # auxiliary head attributes (semantic segmentation)
          __a			:  List[Any]		    =  use_auxiliary_head
          __a			:  List[Any]		    =  auxiliary_loss_weight
          __a			:  str		    =  auxiliary_channels
          __a			:  int		    =  auxiliary_num_convs
          __a			:  Union[str, Any]		    =  auxiliary_concat_input
          __a			:  Dict		    =  semantic_loss_ignore_index





class 		UpperCamelCase__  (	__lowercase   ):
   _SCREAMING_SNAKE_CASE				:							Optional[int]     	=				version.parse("1.11"   )
   @property
   def 				lowerCAmelCase      (self			: Optional[Any]       ):
          return OrderedDict(
              [
                  ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
              ]       )







   @property
   def 				lowerCAmelCase      (self			: Optional[int]       ):
          return 1E-4


# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


lowercase__          ={
    'configuration_efficientnet': [
        'EFFICIENTNET_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'EfficientNetConfig',
        'EfficientNetOnnxConfig',
    ]
}

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowercase__          =['EfficientNetImageProcessor']

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowercase__          =[
          'EFFICIENTNET_PRETRAINED_MODEL_ARCHIVE_LIST',
          'EfficientNetForImageClassification',
          'EfficientNetModel',
          'EfficientNetPreTrainedModel',
      ]

if TYPE_CHECKING:
      from .configuration_efficientnet import (
          EFFICIENTNET_PRETRAINED_CONFIG_ARCHIVE_MAP,
          EfficientNetConfig,
          EfficientNetOnnxConfig,
      )

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .image_processing_efficientnet import EfficientNetImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_efficientnet import (
                EFFICIENTNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                EfficientNetForImageClassification,
                EfficientNetModel,
                EfficientNetPreTrainedModel,
            )

else:
      import sys

      lowercase__          =_LazyModule(__name__, globals()['__file__'], _import_structure)
