



"""simple docstring"""




import numpy as np


def 	lowercase__  (      _UpperCAmelCase					)  ->      Any:






      '''simple docstring'''


      lowercase	:   Optional[int]											= np.exp(_UpperCAmelCase					)

      # Add up the all the exponentials
      lowercase	:   Dict											= np.sum(_UpperCAmelCase					)

      # Divide every exponent by the sum of all exponents
      lowercase	:   Dict											= exponent_vector / sum_of_exponents

      return softmax_vector


if __name__ == "__main__":
     print(softmax((0,)))





"""simple docstring"""




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


_UpperCamelCase:					Tuple     				=	logging.get_logger(__name__)

_UpperCamelCase:					List[str]     				=	{
    'facebook/regnet-y-040': 'https://huggingface.co/facebook/regnet-y-040/blob/main/config.json',
}


class 	a__		(    SCREAMING_SNAKE_CASE__  ):
   _lowerCamelCase       				=					'regnet'
   _lowerCamelCase       				=					['x', 'y']


   def __init__(				self   :				Union[str, Any],  lowerCAmelCase   :				Union[str, Any]=3,  lowerCAmelCase   :				Tuple=32,  lowerCAmelCase   :				Optional[int]=[128, 192, 512, 1088],  lowerCAmelCase   :				Optional[int]=[2, 6, 12, 2],  lowerCAmelCase   :				str=64,  lowerCAmelCase   :				List[str]="y",  lowerCAmelCase   :				Optional[int]="relu",  **lowerCAmelCase   :				List[Any],  )     ->							Union[str, Any]:
         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	:   str											= embedding_size
         lowercase	:   int											= hidden_sizes
         lowercase	:   Tuple											= depths
         lowercase	:   str											= groups_width
         lowercase	:   List[str]											= layer_type
         lowercase	:   Optional[int]											= hidden_act
         # always downsample in the first stage
         lowercase	:   Optional[Any]											= True
