from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_tokenizers_available, is_torch_available, is_vision_available
from ...utils import OptionalDependencyNotAvailable


UpperCamelCase  							=						{'''configuration_dpt''': ['''DPT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DPTConfig''']}

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase  							=						['''DPTFeatureExtractor''']
      UpperCamelCase  							=						['''DPTImageProcessor''']

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase  							=						[
          '''DPT_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''DPTForDepthEstimation''',
          '''DPTForSemanticSegmentation''',
          '''DPTModel''',
          '''DPTPreTrainedModel''',
      ]


if TYPE_CHECKING:
      from .configuration_dpt import DPT_PRETRAINED_CONFIG_ARCHIVE_MAP, DPTConfig

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_dpt import DPTFeatureExtractor
            from .image_processing_dpt import DPTImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_dpt import (
                DPT_PRETRAINED_MODEL_ARCHIVE_LIST,
                DPTForDepthEstimation,
                DPTForSemanticSegmentation,
                DPTModel,
                DPTPreTrainedModel,
            )


else:
      import sys

      UpperCamelCase  							=						_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





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


_A   =     logging.get_logger(__name__)

_A   =     {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}





class 	_lowerCAmelCase					(	__a       ):
				_lowercase					='''megatron-bert'''




				def __init__(					self				,				_UpperCamelCase=29_056				,				_UpperCamelCase=1_024				,				_UpperCamelCase=24				,				_UpperCamelCase=16				,				_UpperCamelCase=4_096				,				_UpperCamelCase="gelu"				,				_UpperCamelCase=0.1				,				_UpperCamelCase=0.1				,				_UpperCamelCase=512				,				_UpperCamelCase=2				,				_UpperCamelCase=0.02				,				_UpperCamelCase=1e-1_2				,				_UpperCamelCase=0				,				_UpperCamelCase="absolute"				,				_UpperCamelCase=True				,				**_UpperCamelCase				,				)				->      int:
							super().__init__(pad_token_id=_UpperCamelCase				,				**_UpperCamelCase     )

							lowerCAmelCase_						=	vocab_size
							lowerCAmelCase_						=	hidden_size
							lowerCAmelCase_						=	num_hidden_layers
							lowerCAmelCase_						=	num_attention_heads
							lowerCAmelCase_						=	hidden_act
							lowerCAmelCase_						=	intermediate_size
							lowerCAmelCase_						=	hidden_dropout_prob
							lowerCAmelCase_						=	attention_probs_dropout_prob
							lowerCAmelCase_						=	max_position_embeddings
							lowerCAmelCase_						=	type_vocab_size
							lowerCAmelCase_						=	initializer_range
							lowerCAmelCase_						=	layer_norm_eps
							lowerCAmelCase_						=	position_embedding_type
							lowerCAmelCase_						=	use_cache



