
"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


lowerCAmelCase__							=				logging.get_logger(__name__)

lowerCAmelCase__							=				{
    'facebook/convnextv2-tiny-1k-224': 'https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json',
}





class  snake_case     (							__lowercase       ,			__lowercase   ):
							UpperCAmelCase__						     =      '''convnextv2'''

							def __init__(self       ,       SCREAMING_SNAKE_CASE_=3       ,       SCREAMING_SNAKE_CASE_=4       ,       SCREAMING_SNAKE_CASE_=4       ,       SCREAMING_SNAKE_CASE_=None       ,       SCREAMING_SNAKE_CASE_=None       ,       SCREAMING_SNAKE_CASE_="gelu"       ,       SCREAMING_SNAKE_CASE_=0.02       ,       SCREAMING_SNAKE_CASE_=1e-1_2       ,       SCREAMING_SNAKE_CASE_=0.0       ,       SCREAMING_SNAKE_CASE_=2_24       ,       SCREAMING_SNAKE_CASE_=None       ,       SCREAMING_SNAKE_CASE_=None       ,       **SCREAMING_SNAKE_CASE_       ,       ):

									"""simple docstring"""







									super().__init__(**SCREAMING_SNAKE_CASE_    )

									SCREAMING_SNAKE_CASE_						 = num_channels
									SCREAMING_SNAKE_CASE_						 = patch_size
									SCREAMING_SNAKE_CASE_						 = num_stages
									SCREAMING_SNAKE_CASE_						 = [96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
									SCREAMING_SNAKE_CASE_						 = [3, 3, 9, 3] if depths is None else depths
									SCREAMING_SNAKE_CASE_						 = hidden_act
									SCREAMING_SNAKE_CASE_						 = initializer_range
									SCREAMING_SNAKE_CASE_						 = layer_norm_eps
									SCREAMING_SNAKE_CASE_						 = drop_path_rate
									SCREAMING_SNAKE_CASE_						 = image_size
									SCREAMING_SNAKE_CASE_						 = ['''stem'''] + [f'stage{idx}' for idx in range(1       ,       len(self.depths    ) + 1    )]
									SCREAMING_SNAKE_CASE_ ,SCREAMING_SNAKE_CASE_						 = get_aligned_output_features_output_indices(
									    out_features=SCREAMING_SNAKE_CASE_       ,       out_indices=SCREAMING_SNAKE_CASE_       ,       stage_names=self.stage_names    )

"""simple docstring"""




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


lowerCAmelCase__							=				logging.get_logger(__name__)

lowerCAmelCase__							=				{
    '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  snake_case     (							__lowercase   ):
							UpperCAmelCase__						     =      '''glpn'''

							def __init__(self       ,       SCREAMING_SNAKE_CASE_=3       ,       SCREAMING_SNAKE_CASE_=4       ,       SCREAMING_SNAKE_CASE_=[2, 2, 2, 2]       ,       SCREAMING_SNAKE_CASE_=[8, 4, 2, 1]       ,       SCREAMING_SNAKE_CASE_=[32, 64, 1_60, 2_56]       ,       SCREAMING_SNAKE_CASE_=[7, 3, 3, 3]       ,       SCREAMING_SNAKE_CASE_=[4, 2, 2, 2]       ,       SCREAMING_SNAKE_CASE_=[1, 2, 5, 8]       ,       SCREAMING_SNAKE_CASE_=[4, 4, 4, 4]       ,       SCREAMING_SNAKE_CASE_="gelu"       ,       SCREAMING_SNAKE_CASE_=0.0       ,       SCREAMING_SNAKE_CASE_=0.0       ,       SCREAMING_SNAKE_CASE_=0.02       ,       SCREAMING_SNAKE_CASE_=0.1       ,       SCREAMING_SNAKE_CASE_=1e-6       ,       SCREAMING_SNAKE_CASE_=64       ,       SCREAMING_SNAKE_CASE_=10       ,       SCREAMING_SNAKE_CASE_=-1       ,       **SCREAMING_SNAKE_CASE_       ,       ):

									"""simple docstring"""







									super().__init__(**SCREAMING_SNAKE_CASE_    )

									SCREAMING_SNAKE_CASE_						 = num_channels
									SCREAMING_SNAKE_CASE_						 = num_encoder_blocks
									SCREAMING_SNAKE_CASE_						 = depths
									SCREAMING_SNAKE_CASE_						 = sr_ratios
									SCREAMING_SNAKE_CASE_						 = hidden_sizes
									SCREAMING_SNAKE_CASE_						 = patch_sizes
									SCREAMING_SNAKE_CASE_						 = strides
									SCREAMING_SNAKE_CASE_						 = mlp_ratios
									SCREAMING_SNAKE_CASE_						 = num_attention_heads
									SCREAMING_SNAKE_CASE_						 = hidden_act
									SCREAMING_SNAKE_CASE_						 = hidden_dropout_prob
									SCREAMING_SNAKE_CASE_						 = attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_						 = initializer_range
									SCREAMING_SNAKE_CASE_						 = drop_path_rate
									SCREAMING_SNAKE_CASE_						 = layer_norm_eps
									SCREAMING_SNAKE_CASE_						 = decoder_hidden_size
									SCREAMING_SNAKE_CASE_						 = max_depth
									SCREAMING_SNAKE_CASE_						 = head_in_index