



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


A		=						logging.get_logger(__name__)

A		=						{
    'facebook/levit-128S': 'https://huggingface.co/facebook/levit-128S/resolve/main/config.json',
    # See all LeViT models at https://huggingface.co/models?filter=levit
}

class       _a  ( SCREAMING_SNAKE_CASE__):
			__magic_name__     					=     """levit"""



			def __init__(			self							:				List[Any]   ,	_lowercase							:				Any=224   ,	_lowercase							:				Optional[Any]=3   ,	_lowercase							:				Optional[Any]=3   ,	_lowercase							:				List[Any]=2   ,	_lowercase							:				Tuple=1   ,	_lowercase							:				Optional[Any]=16   ,	_lowercase							:				Dict=[128, 256, 384]   ,	_lowercase							:				List[str]=[4, 8, 12]   ,	_lowercase							:				Dict=[4, 4, 4]   ,	_lowercase							:				str=[16, 16, 16]   ,	_lowercase							:				Dict=0   ,	_lowercase							:				Optional[Any]=[2, 2, 2]   ,	_lowercase							:				Any=[2, 2, 2]   ,	_lowercase							:				Tuple=0.02   ,	**_lowercase							:				Any   ,	)							->					List[Any]:
									super().__init__(**_lowercase		)
									snake_case   :			str						    = image_size
									snake_case   :			List[Any]						    = num_channels
									snake_case   :			Optional[Any]						    = kernel_size
									snake_case   :			List[str]						    = stride
									snake_case   :			Dict						    = padding
									snake_case   :			List[Any]						    = hidden_sizes
									snake_case   :			Optional[Any]						    = num_attention_heads
									snake_case   :			int						    = depths
									snake_case   :			List[Any]						    = key_dim
									snake_case   :			Dict						    = drop_path_rate
									snake_case   :			int						    = patch_size
									snake_case   :			Dict						    = attention_ratio
									snake_case   :			Tuple						    = mlp_ratio
									snake_case   :			Tuple						    = initializer_range
									snake_case   :			Any						    = [
									    ["Subsample", key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
									    ["Subsample", key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
									]



class       _a  ( SCREAMING_SNAKE_CASE__):
			__magic_name__     					=     version.parse("""1.11""")



			@property
			def 				__lowercase					(			self							:				Optional[Any]		)							->					Mapping[str, Mapping[int, str]]:
									return OrderedDict(
									    [
									        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
									    ]		)



			@property
			def 				__lowercase					(			self							:				Any		)							->					float:
									return 1E-4








"""simple docstring"""







A		=						8.31_4462  # Unit - J mol-1 K-1

def  __SCREAMING_SNAKE_CASE		(			lowerCamelCase_:							float     ,		lowerCamelCase_:							float     ,		lowerCamelCase_:							float ):
						"""simple docstring"""






						if moles < 0 or kelvin < 0 or volume < 0:
												raise ValueError("Invalid inputs. Enter positive value." )
						return moles * kelvin * UNIVERSAL_GAS_CONSTANT / volume

def  __SCREAMING_SNAKE_CASE		(			lowerCamelCase_:							float     ,		lowerCamelCase_:							float     ,		lowerCamelCase_:							float ):
						"""simple docstring"""






						if moles < 0 or kelvin < 0 or pressure < 0:
												raise ValueError("Invalid inputs. Enter positive value." )
						return moles * kelvin * UNIVERSAL_GAS_CONSTANT / pressure


if __name__ == "__main__":
			from doctest import testmod

			testmod()



