



"""simple docstring"""


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


snake_case_				     =       logging.get_logger(__name__)

snake_case_				     =       {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}







class       A_			(     SCREAMING_SNAKE_CASE_				):



						"""simple docstring"""
						__UpperCamelCase						=							"""openai-gpt"""
						__UpperCamelCase						=							{
						    """max_position_embeddings""": """n_positions""",
						    """hidden_size""": """n_embd""",
						    """num_attention_heads""": """n_head""",
						    """num_hidden_layers""": """n_layer""",
						}






						def __init__(					self :Optional[int]   ,  lowercase_ :Optional[int]=4_04_78   ,  lowercase_ :List[Any]=5_12   ,  lowercase_ :List[str]=7_68   ,  lowercase_ :int=12   ,  lowercase_ :Dict=12   ,  lowercase_ :Union[str, Any]="gelu"   ,  lowercase_ :Union[str, Any]=0.1   ,  lowercase_ :str=0.1   ,  lowercase_ :List[str]=0.1   ,  lowercase_ :Optional[Any]=1E-5   ,  lowercase_ :Optional[int]=0.02   ,  lowercase_ :Optional[Any]="cls_index"   ,  lowercase_ :List[str]=True   ,  lowercase_ :List[str]=None   ,  lowercase_ :str=True   ,  lowercase_ :int=0.1   ,  **lowercase_ :List[Any]   ,  )				->			str:
												UpperCAmelCase             = vocab_size
												UpperCAmelCase             = n_positions
												UpperCAmelCase             = n_embd
												UpperCAmelCase             = n_layer
												UpperCAmelCase             = n_head
												UpperCAmelCase             = afn
												UpperCAmelCase             = resid_pdrop
												UpperCAmelCase             = embd_pdrop
												UpperCAmelCase             = attn_pdrop
												UpperCAmelCase             = layer_norm_epsilon
												UpperCAmelCase             = initializer_range
												UpperCAmelCase             = summary_type
												UpperCAmelCase             = summary_use_proj
												UpperCAmelCase             = summary_activation
												UpperCAmelCase             = summary_first_dropout
												UpperCAmelCase             = summary_proj_to_labels
												super().__init__(**lowercase_					)






'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


__lowercase          =  {
    '''configuration_resnet''': ['''RESNET_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ResNetConfig''', '''ResNetOnnxConfig''']
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase          =  [
						    '''RESNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''ResNetForImageClassification''',
						    '''ResNetModel''',
						    '''ResNetPreTrainedModel''',
						    '''ResNetBackbone''',
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase          =  [
						    '''TF_RESNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TFResNetForImageClassification''',
						    '''TFResNetModel''',
						    '''TFResNetPreTrainedModel''',
						]

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowercase          =  [
						    '''FlaxResNetForImageClassification''',
						    '''FlaxResNetModel''',
						    '''FlaxResNetPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_resnet import RESNET_PRETRAINED_CONFIG_ARCHIVE_MAP, ResNetConfig, ResNetOnnxConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_resnet import (
												    RESNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    ResNetBackbone,
												    ResNetForImageClassification,
												    ResNetModel,
												    ResNetPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_resnet import (
												    TF_RESNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFResNetForImageClassification,
												    TFResNetModel,
												    TFResNetPreTrainedModel,
												)

						try:
												if not is_flax_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_flax_resnet import FlaxResNetForImageClassification, FlaxResNetModel, FlaxResNetPreTrainedModel


else:
						import sys

						__lowercase          =  _LazyModule(__name__, globals()['''__file__'''], _import_structure)




