


"""simple docstring"""


from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__lowerCamelCase   :Any						     =		logging.get_logger(__name__)

__lowerCamelCase   :List[Any]						     =		{
    'shi-labs/nat-mini-in1k-224': 'https://huggingface.co/shi-labs/nat-mini-in1k-224/resolve/main/config.json',
    # See all Nat models at https://huggingface.co/models?filter=nat
}


class       A__						(    lowercase__			,  lowercase__):


     """simple docstring"""
     snake_case__						:       int				    ='''nat'''

     snake_case__						:       str				    ={
         '''num_attention_heads''': '''num_heads''',
         '''num_hidden_layers''': '''num_layers''',
     }

     def __init__(						self:    Union[str, Any]  ,		__a:    Optional[Any]=4  ,		__a:    Dict=3  ,		__a:    int=64  ,		__a:    Tuple=[3, 4, 6, 5]  ,		__a:    Dict=[2, 4, 8, 16]  ,		__a:    Optional[int]=7  ,		__a:    Optional[Any]=3.0  ,		__a:    Optional[Any]=True  ,		__a:    Any=0.0  ,		__a:    List[Any]=0.0  ,		__a:    Dict=0.1  ,		__a:    Tuple="gelu"  ,		__a:    str=0.02  ,		__a:    str=1e-5  ,		__a:    int=0.0  ,		__a:    List[Any]=None  ,		__a:    Tuple=None  ,		**__a:    Union[str, Any]  ,		)->     Tuple:
           super().__init__(**SCREAMING_SNAKE_CASE_						)

           lowerCamelCase       :       Any   =						patch_size
           lowerCamelCase       :       Dict   =						num_channels
           lowerCamelCase       :       List[Any]   =						embed_dim
           lowerCamelCase       :       Optional[Any]   =						depths
           lowerCamelCase       :       int   =						len(SCREAMING_SNAKE_CASE_						)
           lowerCamelCase       :       List[Any]   =						num_heads
           lowerCamelCase       :       List[str]   =						kernel_size
           lowerCamelCase       :       Union[str, Any]   =						mlp_ratio
           lowerCamelCase       :       Union[str, Any]   =						qkv_bias
           lowerCamelCase       :       List[str]   =						hidden_dropout_prob
           lowerCamelCase       :       Dict   =						attention_probs_dropout_prob
           lowerCamelCase       :       Any   =						drop_path_rate
           lowerCamelCase       :       Optional[Any]   =						hidden_act
           lowerCamelCase       :       Dict   =						layer_norm_eps
           lowerCamelCase       :       Any   =						initializer_range
           # we set the hidden_size attribute in order to make Nat work with VisionEncoderDecoderModel
           # this indicates the channel dimension after the last stage of the model
           lowerCamelCase       :       Dict   =						int(embed_dim * 2 ** (len(SCREAMING_SNAKE_CASE_						) - 1)						)
           lowerCamelCase       :       int   =						layer_scale_init_value
           lowerCamelCase       :       Dict   =						["""stem"""] + [f'stage{idx}' for idx in range(1  ,		len(SCREAMING_SNAKE_CASE_						) + 1						)]
           lowerCamelCase  ,      lowerCamelCase       :       List[str]   =						get_aligned_output_features_output_indices(
               out_features=SCREAMING_SNAKE_CASE_  ,		out_indices=SCREAMING_SNAKE_CASE_  ,		stage_names=self.stage_names						)






"""simple docstring"""






UpperCAmelCase        =				8.3_144_598




def __magic_name__	(				_lowerCamelCase:		float,					_lowerCamelCase:		float			)					->						float:

	'''simple docstring'''




	if temperature < 0:
		raise Exception('''Temperature cannot be less than 0 K'''			)
	if molar_mass <= 0:
		raise Exception('''Molar mass cannot be less than or equal to 0 kg/mol'''			)
	else:
		return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
					import doctest

					# run doctest
					doctest.testmod()

					# example
					UpperCAmelCase        =				3_0_0
					UpperCAmelCase        =				2_8
					UpperCAmelCase        =				rms_speed_of_molecule(temperature, molar_mass)
					print(f"""Vrms of Nitrogen gas at 300 K is {vrms} m/s""")


