

'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase			:				Union[str, Any] 			=					logging.get_logger(__name__)

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







class 							A__   (	A__  ):
  A__					=    'openai-gpt'
  A__					=    {
      'max_position_embeddings': 'n_positions',
      'hidden_size': 'n_embd',
      'num_attention_heads': 'n_head',
      'num_hidden_layers': 'n_layer',
  }





  def __init__(		self				:     Union[str, Any]							, _a				:     Tuple=4_0478							, _a				:     int=512							, _a				:     Tuple=768							, _a				:     int=12							, _a				:     List[str]=12							, _a				:     List[Any]="gelu"							, _a				:     Dict=0.1							, _a				:     str=0.1							, _a				:     Any=0.1							, _a				:     Optional[Any]=1e-5							, _a				:     List[str]=0.02							, _a				:     Any="cls_index"							, _a				:     str=True							, _a				:     Any=None							, _a				:     List[str]=True							, _a				:     Union[str, Any]=0.1							, **_a				:     Optional[int]							, )     ->   Tuple:





       '''simple docstring'''






       _SCREAMING_SNAKE_CASE							   =vocab_size
       _SCREAMING_SNAKE_CASE							   =n_positions
       _SCREAMING_SNAKE_CASE							   =n_embd
       _SCREAMING_SNAKE_CASE							   =n_layer
       _SCREAMING_SNAKE_CASE							   =n_head
       _SCREAMING_SNAKE_CASE							   =afn
       _SCREAMING_SNAKE_CASE							   =resid_pdrop
       _SCREAMING_SNAKE_CASE							   =embd_pdrop
       _SCREAMING_SNAKE_CASE							   =attn_pdrop
       _SCREAMING_SNAKE_CASE							   =layer_norm_epsilon
       _SCREAMING_SNAKE_CASE							   =initializer_range
       _SCREAMING_SNAKE_CASE							   =summary_type
       _SCREAMING_SNAKE_CASE							   =summary_use_proj
       _SCREAMING_SNAKE_CASE							   =summary_activation
       _SCREAMING_SNAKE_CASE							   =summary_first_dropout
       _SCREAMING_SNAKE_CASE							   =summary_proj_to_labels
       super().__init__(**_a			)



'''simple docstring'''
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


lowerCamelCase			:				Optional[int] 			=					{
    "configuration_efficientnet": [
        "EFFICIENTNET_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "EfficientNetConfig",
        "EfficientNetOnnxConfig",
    ]
}

try:
     if not is_vision_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCamelCase			:				str 			=					["EfficientNetImageProcessor"]

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCamelCase			:				Tuple 			=					[
         "EFFICIENTNET_PRETRAINED_MODEL_ARCHIVE_LIST",
         "EfficientNetForImageClassification",
         "EfficientNetModel",
         "EfficientNetPreTrainedModel",
     ]

if TYPE_CHECKING:
     from .configuration_efficientnet import (
         EFFICIENTNET_PRETRAINED_CONFIG_ARCHIVE_MAP,
         EfficientNetConfig,
         EfficientNetOnnxConfig,
     )

     try:
          if not is_vision_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .image_processing_efficientnet import EfficientNetImageProcessor

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_efficientnet import (
              EFFICIENTNET_PRETRAINED_MODEL_ARCHIVE_LIST,
              EfficientNetForImageClassification,
              EfficientNetModel,
              EfficientNetPreTrainedModel,
          )

else:
     import sys

     lowerCamelCase			:				int 			=					_LazyModule(__name__, globals()["__file__"], _import_structure)
