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


_a   :	Optional[int] 					=     logging.get_logger(__name__)

_a   :	Dict 					=     {
    "microsoft/resnet-50": "https://huggingface.co/microsoft/resnet-50/blob/main/config.json",
}
class 		__A							(				SCREAMING_SNAKE_CASE_					,			SCREAMING_SNAKE_CASE_	):
       _UpperCamelCase							:    Any	      =	"resnet"
       _UpperCamelCase							:    Optional[int]	      =	["basic", "bottleneck"]






       def __init__(	self       ,  a__=3       ,  a__=64       ,  a__=[256, 512, 1024, 2048]       ,  a__=[3, 4, 6, 3]       ,  a__="bottleneck"       ,  a__="relu"       ,  a__=False       ,  a__=None       ,  a__=None       ,  **a__       ,  ):
         super().__init__(**__UpperCamelCase						)
         if layer_type not in self.layer_types:
           raise ValueError(F"layer_type={layer_type} is not one of {','.join(self.layer_types						)}"						)
         _lowerCAmelCase		: int						    =  num_channels
         _lowerCAmelCase		: int						    =  embedding_size
         _lowerCAmelCase		: Dict						    =  hidden_sizes
         _lowerCAmelCase		: List[str]						    =  depths
         _lowerCAmelCase		: List[str]						    =  layer_type
         _lowerCAmelCase		: Tuple						    =  hidden_act
         _lowerCAmelCase		: Optional[int]						    =  downsample_in_first_stage
         _lowerCAmelCase		: List[Any]						    =  ["""stem"""] + [F"stage{idx}" for idx in range(1       ,  len(__UpperCamelCase						) + 1						)]
         _lowerCAmelCase    ,			_lowerCAmelCase		: Optional[int]						    =  get_aligned_output_features_output_indices(
             out_features=__UpperCamelCase       ,  out_indices=__UpperCamelCase       ,  stage_names=self.stage_names						)







class 		__A							(				SCREAMING_SNAKE_CASE_	):
       _UpperCamelCase							:    List[Any]	      =	version.parse("1.11"	)






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






       @property
       def 					__A						(	self						):
         return 1e-3





"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_a   :	int 					=     {
    'configuration_altclip': [
        'ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'AltCLIPConfig',
        'AltCLIPTextConfig',
        'AltCLIPVisionConfig',
    ],
    'processing_altclip': ['AltCLIPProcessor'],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     _a   :	Dict 					=     [
         'ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST',
         'AltCLIPPreTrainedModel',
         'AltCLIPModel',
         'AltCLIPTextModel',
         'AltCLIPVisionModel',
     ]


if TYPE_CHECKING:
     from .configuration_altclip import (
         ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
         AltCLIPConfig,
         AltCLIPTextConfig,
         AltCLIPVisionConfig,
     )
     from .processing_altclip import AltCLIPProcessor

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_altclip import (
              ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
              AltCLIPModel,
              AltCLIPPreTrainedModel,
              AltCLIPTextModel,
              AltCLIPVisionModel,
          )


else:
     import sys

     _a   :	List[Any] 					=     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)




