





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


snake_case 				=       logging.get_logger(__name__)

snake_case 				=       {
    """google/vit-base-patch16-224""": """https://huggingface.co/vit-base-patch16-224/resolve/main/config.json""",
    # See all ViT models at https://huggingface.co/models?filter=vit
}





class 				A_				(      UpperCAmelCase	):







       """simple docstring"""





       SCREAMING_SNAKE_CASE_      : Tuple      =  '''vit'''







       def __init__(    self	:	Dict						,__A	:	Dict=768						,__A	:	List[Any]=12						,__A	:	int=12						,__A	:	Union[str, Any]=3072						,__A	:	List[Any]="gelu"						,__A	:	Dict=0.0						,__A	:	Union[str, Any]=0.0						,__A	:	int=0.02						,__A	:	List[str]=1e-12						,__A	:	Optional[Any]=224						,__A	:	Optional[int]=16						,__A	:	Dict=3						,__A	:	str=True						,__A	:	List[str]=16						,**__A	:	int						,)						->					List[str]:
         super().__init__(**__A  )

         _lowercase							= hidden_size
         _lowercase							= num_hidden_layers
         _lowercase							= num_attention_heads
         _lowercase							= intermediate_size
         _lowercase							= hidden_act
         _lowercase							= hidden_dropout_prob
         _lowercase							= attention_probs_dropout_prob
         _lowercase							= initializer_range
         _lowercase							= layer_norm_eps
         _lowercase							= image_size
         _lowercase							= patch_size
         _lowercase							= num_channels
         _lowercase							= qkv_bias
         _lowercase							= encoder_stride





class 				A_				(      UpperCAmelCase	):







       """simple docstring"""





       SCREAMING_SNAKE_CASE_      : Union[str, Any]      =  version.parse('''1.11'''	)







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







       @property
       def    __UpperCAmelCase (    self	:	Union[str, Any]  )						->					float:
         return 1e-4






def 							SCREAMING_SNAKE_CASE__       (  snake_case__  :str			,							snake_case__  :int     )      ->						list[str]:
  return [sentence[i : i + ngram_size] for i in range(len(snake_case__     ) - ngram_size + 1     )]


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

      testmod()