'''simple docstring'''




from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


if TYPE_CHECKING:
	from ... import FeatureExtractionMixin, TensorType

_A								=   logging.get_logger(__name__)

_A								=   {
    'openai/imagegpt-small': '',
    'openai/imagegpt-medium': '',
    'openai/imagegpt-large': '',
}


class       UpperCAmelCase__  (       _snake_case			):






			"""simple docstring"""
			A							:       Any     =    '''imagegpt'''
			A							:       Dict     =    ['''past_key_values''']
			A							:       str     =    {
			    '''hidden_size''': '''n_embd''',
			    '''max_position_embeddings''': '''n_positions''',
			    '''num_attention_heads''': '''n_head''',
			    '''num_hidden_layers''': '''n_layer''',
			}
			def __init__(self       ,				_a=512 + 1       ,				_a=32 * 32       ,				_a=512       ,				_a=24       ,				_a=8       ,				_a=None       ,				_a="quick_gelu"       ,				_a=0.1       ,				_a=0.1       ,				_a=0.1       ,				_a=1e-5       ,				_a=0.02       ,				_a=True       ,				_a=True       ,				_a=False       ,				_a=False       ,				_a=False       ,				**_a       ,				)    ->     Union[str, Any]:
								lowercase_					:       List[Any]     				=					vocab_size
								lowercase_					:       Optional[Any]     				=					n_positions
								lowercase_					:       Optional[Any]     				=					n_embd
								lowercase_					:       Dict     				=					n_layer
								lowercase_					:       Dict     				=					n_head
								lowercase_					:       int     				=					n_inner
								lowercase_					:       Optional[Any]     				=					activation_function
								lowercase_					:       Optional[Any]     				=					resid_pdrop
								lowercase_					:       Union[str, Any]     				=					embd_pdrop
								lowercase_					:       Optional[int]     				=					attn_pdrop
								lowercase_					:       List[str]     				=					layer_norm_epsilon
								lowercase_					:       str     				=					initializer_range
								lowercase_					:       Any     				=					scale_attn_weights
								lowercase_					:       Dict     				=					use_cache
								lowercase_					:       Any     				=					scale_attn_by_inverse_layer_idx
								lowercase_					:       Union[str, Any]     				=					reorder_and_upcast_attn
								lowercase_					:       List[Any]     				=					tie_word_embeddings

								super().__init__(tie_word_embeddings=_a       ,				**_a				)



class       UpperCAmelCase__  (       _snake_case			):






			"""simple docstring"""
			@property
			def 		_lowerCamelCase (self				)    ->     Mapping[str, Mapping[int, str]]:
								return OrderedDict(
								    [
								        ('input_ids', {0: 'batch', 1: 'sequence'}),
								    ]				)





			def 		_lowerCamelCase (self       ,				_a       ,				_a = 1       ,				_a = -1       ,				_a = False       ,				_a = None       ,				_a = 3       ,				_a = 32       ,				_a = 32       ,				)    ->     Mapping[str, Any]:
								lowercase_					:       Optional[Any]     				=					self._generate_dummy_images(_a       ,				_a       ,				_a       ,				_a				)
								lowercase_					:       Optional[int]     				=					dict(preprocessor(images=_a       ,				return_tensors=_a				)				)

								return inputs





'''simple docstring'''




def _UpperCamelCase   (       SCREAMING_SNAKE_CASE_							):
     lowercase_					:       List[Any]     				=					len(SCREAMING_SNAKE_CASE_							)
     for _ in range(SCREAMING_SNAKE_CASE_							):
          for i in range(_ % 2  ,       arr_size - 1  ,       2							):
               if arr[i + 1] < arr[i]:
                    lowercase_				,lowercase_					:       Optional[Any]     				=					arr[i + 1], arr[i]

     return arr


if __name__ == "__main__":
 _A								=   list(range(1_0, 0, -1))
 print(F"""Original: {arr}. Sorted: {odd_even_transposition(arr)}""")




