


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


snake_case							:	int					      =				logging.get_logger(__name__)

snake_case							:	Union[str, Any]					      =				{
    '''sail/poolformer_s12''': '''https://huggingface.co/sail/poolformer_s12/resolve/main/config.json''',
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
}







class 	snake_case_       (lowerCamelCase_				):
					UpperCAmelCase__ :   List[str]   				=      '''poolformer'''
					def __init__(				self       :Optional[int]      ,__snake_case       :Tuple=3      ,__snake_case       :Any=16      ,__snake_case       :str=16      ,__snake_case       :Dict=3      ,__snake_case       :Optional[int]=4.0      ,__snake_case       :int=[2, 2, 6, 2]      ,__snake_case       :int=[64, 1_28, 3_20, 5_12]      ,__snake_case       :Any=[7, 3, 3, 3]      ,__snake_case       :str=[4, 2, 2, 2]      ,__snake_case       :Optional[int]=[2, 1, 1, 1]      ,__snake_case       :List[Any]=4      ,__snake_case       :List[str]=0.0      ,__snake_case       :Optional[Any]="gelu"      ,__snake_case       :Tuple=True      ,__snake_case       :Any=1E-5      ,__snake_case       :List[str]=0.02      ,**__snake_case       :Any      ,) ->   Union[str, Any]:
												a__					=					num_channels
												a__					=					patch_size
												a__					=					stride
												a__					=					padding
												a__					=					pool_size
												a__					=					hidden_sizes
												a__					=					mlp_ratio
												a__					=					depths
												a__					=					patch_sizes
												a__					=					strides
												a__					=					num_encoder_blocks
												a__					=					drop_path_rate
												a__					=					hidden_act
												a__					=					use_layer_scale
												a__					=					layer_scale_init_value
												a__					=					initializer_range
												super().__init__(**__snake_case				)







class 	snake_case_       (lowerCamelCase_				):
					UpperCAmelCase__ :   Dict   				=      version.parse('''1.11'''				)
					@property
					def 			lowerCamelCase__(				self       :Optional[int]				) ->   Mapping[str, Mapping[int, str]]:
												return OrderedDict(
												    [
												        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
												    ]				)



					@property
					def 			lowerCamelCase__(				self       :Any				) ->   float:
												return 2E-3








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case							:	Optional[int]					      =				{
    '''configuration_clipseg''': [
        '''CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''CLIPSegConfig''',
        '''CLIPSegTextConfig''',
        '''CLIPSegVisionConfig''',
    ],
    '''processing_clipseg''': ['''CLIPSegProcessor'''],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							:	List[str]					      =				[
						    '''CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''CLIPSegModel''',
						    '''CLIPSegPreTrainedModel''',
						    '''CLIPSegTextModel''',
						    '''CLIPSegVisionModel''',
						    '''CLIPSegForImageSegmentation''',
						]

if TYPE_CHECKING:
						from .configuration_clipseg import (
						    CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    CLIPSegConfig,
						    CLIPSegTextConfig,
						    CLIPSegVisionConfig,
						)
						from .processing_clipseg import CLIPSegProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_clipseg import (
												    CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST,
												    CLIPSegForImageSegmentation,
												    CLIPSegModel,
												    CLIPSegPreTrainedModel,
												    CLIPSegTextModel,
												    CLIPSegVisionModel,
												)

else:
						import sys

						snake_case							:	Optional[int]					      =				_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




