'''simple docstring'''




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


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

_lowercase		:				Union[str, Any]	       =		{
    "vinvino02/glpn-kitti": "https://huggingface.co/vinvino02/glpn-kitti/resolve/main/config.json",
    # See all GLPN models at https://huggingface.co/models?filter=glpn
}





class 					__magic_name__		(					_UpperCAmelCase):
			UpperCamelCase__       = '''glpn'''







			def __init__(			self       :						List[Any]       ,    lowercase_       :						Optional[int]=3       ,    lowercase_       :						Tuple=4       ,    lowercase_       :						Any=[2, 2, 2, 2]       ,    lowercase_       :						Optional[int]=[8, 4, 2, 1]       ,    lowercase_       :						Tuple=[32, 64, 160, 256]       ,    lowercase_       :						Optional[int]=[7, 3, 3, 3]       ,    lowercase_       :						Dict=[4, 2, 2, 2]       ,    lowercase_       :						List[Any]=[1, 2, 5, 8]       ,    lowercase_       :						str=[4, 4, 4, 4]       ,    lowercase_       :						str="gelu"       ,    lowercase_       :						Tuple=0.0       ,    lowercase_       :						str=0.0       ,    lowercase_       :						Union[str, Any]=0.02       ,    lowercase_       :						Dict=0.1       ,    lowercase_       :						Union[str, Any]=1E-6       ,    lowercase_       :						int=64       ,    lowercase_       :						str=10       ,    lowercase_       :						Union[str, Any]=-1       ,    **lowercase_       :						Optional[int]       ,    ):
										super().__init__(**lowercase_					)

										lowercase_      :    int       		= num_channels
										lowercase_      :    int       		= num_encoder_blocks
										lowercase_      :    Union[str, Any]       		= depths
										lowercase_      :    List[Any]       		= sr_ratios
										lowercase_      :    List[Any]       		= hidden_sizes
										lowercase_      :    Any       		= patch_sizes
										lowercase_      :    Union[str, Any]       		= strides
										lowercase_      :    List[Any]       		= mlp_ratios
										lowercase_      :    Optional[int]       		= num_attention_heads
										lowercase_      :    Union[str, Any]       		= hidden_act
										lowercase_      :    List[Any]       		= hidden_dropout_prob
										lowercase_      :    Dict       		= attention_probs_dropout_prob
										lowercase_      :    str       		= initializer_range
										lowercase_      :    Tuple       		= drop_path_rate
										lowercase_      :    Any       		= layer_norm_eps
										lowercase_      :    List[Any]       		= decoder_hidden_size
										lowercase_      :    Union[str, Any]       		= max_depth
										lowercase_      :    Dict       		= head_in_index






'''simple docstring'''




from typing import TYPE_CHECKING

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


_lowercase		:				List[Any]	       =		{"configuration_focalnet": ["FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP", "FocalNetConfig"]}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase		:				int	       =		[
						    "FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "FocalNetForImageClassification",
						    "FocalNetForMaskedImageModeling",
						    "FocalNetBackbone",
						    "FocalNetModel",
						    "FocalNetPreTrainedModel",
						]

if TYPE_CHECKING:
						from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_focalnet import (
												    FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    FocalNetBackbone,
												    FocalNetForImageClassification,
												    FocalNetForMaskedImageModeling,
												    FocalNetModel,
												    FocalNetPreTrainedModel,
												)

else:
						import sys

						_lowercase		:				Union[str, Any]	       =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





