




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


lowercase__			=	logging.get_logger(__name__)

lowercase__			=	{
    '''apple/mobilevitv2-1.0''': '''https://huggingface.co/apple/mobilevitv2-1.0/resolve/main/config.json''',
}






class 						lowercase     (   UpperCAmelCase_):
      __lowercase 		=  '''mobilevitv2'''






      def __init__(self ,  a__=3 ,  a__=2_5_6 ,  a__=2 ,  a__=2.0 ,  a__="swish" ,  a__=3 ,  a__=3_2 ,  a__=0.1 ,  a__=0.02 ,  a__=1E-5 ,  a__=5_1_2 ,  a__=[6, 1_2, 1_8] ,  a__=0.1 ,  a__=2_5_5 ,  a__=[2, 4, 3] ,  a__=[1_2_8, 1_9_2, 2_5_6] ,  a__=1.0 ,  a__=2 ,  a__=0.0 ,  a__=0.0 ,  **a__ ,  )       ->   Optional[int]:
         super().__init__(**a__					)

         SCREAMING_SNAKE_CASE__			:				Any       						= num_channels
         SCREAMING_SNAKE_CASE__			:				Optional[int]       						= image_size
         SCREAMING_SNAKE_CASE__			:				Any       						= patch_size
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= expand_ratio
         SCREAMING_SNAKE_CASE__			:				int       						= hidden_act
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= conv_kernel_size
         SCREAMING_SNAKE_CASE__			:				Optional[Any]       						= output_stride
         SCREAMING_SNAKE_CASE__			:				List[Any]       						= initializer_range
         SCREAMING_SNAKE_CASE__			:				Dict       						= layer_norm_eps
         SCREAMING_SNAKE_CASE__			:				str       						= n_attn_blocks
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= base_attn_unit_dims
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= width_multiplier
         SCREAMING_SNAKE_CASE__			:				Tuple       						= ffn_multiplier
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= ffn_dropout
         SCREAMING_SNAKE_CASE__			:				Any       						= attn_dropout
         SCREAMING_SNAKE_CASE__			:				Dict       						= classifier_dropout_prob

         # decode head attributes for semantic segmentation
         SCREAMING_SNAKE_CASE__			:				Any       						= aspp_out_channels
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= atrous_rates
         SCREAMING_SNAKE_CASE__			:				str       						= aspp_dropout_prob
         SCREAMING_SNAKE_CASE__			:				Union[str, Any]       						= semantic_loss_ignore_index






class 						lowercase     (   UpperCAmelCase_):
      __lowercase 		=  version.parse('''1.11''')






      @property
      def    A__(self					)       ->   Mapping[str, Mapping[int, str]]:
         return OrderedDict([('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''})]					)






      @property
      def    A__(self					)       ->   Mapping[str, Mapping[int, str]]:
         if self.task == "image-classification":
            return OrderedDict([('''logits''', {0: '''batch'''})]					)
         else:
            return OrderedDict([('''last_hidden_state''', {0: '''batch'''}), ('''pooler_output''', {0: '''batch'''})]					)






      @property
      def    A__(self					)       ->   float:
         return 1E-4







'''simple docstring'''





# 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,
)


lowercase__			=	{
    '''configuration_convnextv2''': [
        '''CONVNEXTV2_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ConvNextV2Config''',
    ]
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase__			=	[
           '''CONVNEXTV2_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''ConvNextV2ForImageClassification''',
           '''ConvNextV2Model''',
           '''ConvNextV2PreTrainedModel''',
           '''ConvNextV2Backbone''',
       ]


if TYPE_CHECKING:
       from .configuration_convnextva import (
           CONVNEXTV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
           ConvNextVaConfig,
       )

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_convnextva import (
                  CONVNEXTV2_PRETRAINED_MODEL_ARCHIVE_LIST,
                  ConvNextVaBackbone,
                  ConvNextVaForImageClassification,
                  ConvNextVaModel,
                  ConvNextVaPreTrainedModel,
              )

else:
       import sys

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

