


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


__snake_case							=       logging.get_logger(__name__)

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


class     __lowerCamelCase  (					_a  ,					_a				):

     '''simple docstring'''
     A_       :	Tuple    =		'resnet'
     A_       :	Tuple    =		['basic', 'bottleneck']


     def __init__(      self    ,				__UpperCAmelCase=3    ,				__UpperCAmelCase=64    ,				__UpperCAmelCase=[256, 512, 1024, 2048]    ,				__UpperCAmelCase=[3, 4, 6, 3]    ,				__UpperCAmelCase="bottleneck"    ,				__UpperCAmelCase="relu"    ,				__UpperCAmelCase=False    ,				__UpperCAmelCase=None    ,				__UpperCAmelCase=None    ,				**__UpperCAmelCase    ,				)       ->							Tuple:
          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     __lowerCamelCase  (					_a				):

     '''simple docstring'''
     A_       :	Dict    =		version.parse('1.11'				)


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





     @property
     def 							_UpperCAmelCase      (      self							)       ->							str:
          return 1e-3



"""simple docstring"""






from typing import Any
def       A_   (   _lowerCAmelCase     :					list       ):






     """simple docstring"""

     if not input_list:
          return []
     _a    	=				[input_list.count(_lowerCAmelCase       ) for value in input_list]
     _a    	=				max(_lowerCAmelCase       )  # Gets the maximum count in the input list.
     # Gets values of modes
     return sorted({input_list[i] for i, value in enumerate(_lowerCAmelCase       ) if value == y}       )


if __name__ == "__main__":
   import doctest

   doctest.testmod()