





def  __UpperCamelCase    (						snake_case      )    ->		str:


   '''simple docstring'''







   return -num if num < 0 else num
def  __UpperCamelCase    (						snake_case      )    ->		Union[str, Any]:


   '''simple docstring'''







   if len(__UpperCAmelCase      ) == 0:
      raise ValueError('''abs_min() arg is an empty sequence'''      )
   __A    =  x[0]
   for i in x:
      if abs_val(__UpperCAmelCase      ) < abs_val(__UpperCAmelCase      ):
         __A    =  i
   return j
def  __UpperCamelCase    (						snake_case      )    ->		List[str]:


   '''simple docstring'''







   if len(__UpperCAmelCase      ) == 0:
      raise ValueError('''abs_max() arg is an empty sequence'''      )
   __A    =  x[0]
   for i in x:
      if abs(__UpperCAmelCase      ) > abs(__UpperCAmelCase      ):
         __A    =  i
   return j
def  __UpperCamelCase    (						snake_case      )    ->		int:


   '''simple docstring'''







   if len(__UpperCAmelCase      ) == 0:
      raise ValueError('''abs_max_sort() arg is an empty sequence'''      )
   return sorted(__UpperCAmelCase							,			key=__UpperCAmelCase      )[-1]
def  __UpperCamelCase    (						)    ->		int:


   '''simple docstring'''







   assert abs_val(0      ) == 0
   assert abs_val(3_4      ) == 3_4
   assert abs_val(-1_0_0_0_0_0_0_0_0_0_0_0      ) == 1_0_0_0_0_0_0_0_0_0_0_0

   __A    =  [-3, -1, 2, -1_1]
   assert abs_max(__UpperCAmelCase      ) == -1_1
   assert abs_max_sort(__UpperCAmelCase      ) == -1_1
   assert abs_min(__UpperCAmelCase      ) == -1


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    test_abs_val()
    print(abs_val(-3_4))  # --> 34


"""simple docstring"""







from ...configuration_utils import PretrainedConfig
from ...utils import logging


SCREAMING_SNAKE_CASE						=    logging.get_logger(__name__)

SCREAMING_SNAKE_CASE						=    {
    'facebook/regnet-y-040': 'https://huggingface.co/facebook/regnet-y-040/blob/main/config.json',
}



class 			_lowerCamelCase      (__lowerCamelCase  ):
				_snake_case  =	"regnet"
				_snake_case  =	["x", "y"]







				def __init__(			self     :							Any      ,       lowerCamelCase_     :							Optional[Any]=3      ,       lowerCamelCase_     :							List[str]=3_2      ,       lowerCamelCase_     :							str=[1_2_8, 1_9_2, 5_1_2, 1_0_8_8]      ,       lowerCamelCase_     :							int=[2, 6, 1_2, 2]      ,       lowerCamelCase_     :							Union[str, Any]=6_4      ,       lowerCamelCase_     :							int="y"      ,       lowerCamelCase_     :							Optional[Any]="relu"      ,       **lowerCamelCase_     :							Optional[Any]      ,       ):

					"""simple docstring"""






					super().__init__(**lowerCamelCase_    )
					if layer_type not in self.layer_types:
						raise ValueError(F'''layer_type={layer_type} is not one of {','.join(self.layer_types    )}'''    )
					_lowercase			:     str      					=				num_channels
					_lowercase			:     Optional[Any]      					=				embedding_size
					_lowercase			:     Union[str, Any]      					=				hidden_sizes
					_lowercase			:     Optional[int]      					=				depths
					_lowercase			:     Optional[int]      					=				groups_width
					_lowercase			:     Tuple      					=				layer_type
					_lowercase			:     Union[str, Any]      					=				hidden_act
					# always downsample in the first stage
					_lowercase			:     Optional[int]      					=				True



