





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


UpperCamelCase__      =logging.get_logger(__name__)

UpperCamelCase__      ={
    '''sayakpaul/vit-msn-base''': '''https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json''',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}





class 			lowerCAmelCase__( snake_case__    ):






  '''simple docstring'''


  __snake_case 			=    '''vit_msn'''




  def __init__(      self    ,						__lowerCamelCase=7_6_8    ,						__lowerCamelCase=1_2    ,						__lowerCamelCase=1_2    ,						__lowerCamelCase=3_0_7_2    ,						__lowerCamelCase="gelu"    ,						__lowerCamelCase=0.0    ,						__lowerCamelCase=0.0    ,						__lowerCamelCase=0.02    ,						__lowerCamelCase=1E-06    ,						__lowerCamelCase=2_2_4    ,						__lowerCamelCase=1_6    ,						__lowerCamelCase=3    ,						__lowerCamelCase=True    ,						**__lowerCamelCase    ,						)			->     str:
       super().__init__(**_A							)

       _SCREAMING_SNAKE_CASE       :	str						    =							hidden_size
       _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							num_hidden_layers
       _SCREAMING_SNAKE_CASE       :	Dict						    =							num_attention_heads
       _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							intermediate_size
       _SCREAMING_SNAKE_CASE       :	List[Any]						    =							hidden_act
       _SCREAMING_SNAKE_CASE       :	List[str]						    =							hidden_dropout_prob
       _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							attention_probs_dropout_prob
       _SCREAMING_SNAKE_CASE       :	str						    =							initializer_range
       _SCREAMING_SNAKE_CASE       :	str						    =							layer_norm_eps
       _SCREAMING_SNAKE_CASE       :	List[str]						    =							image_size
       _SCREAMING_SNAKE_CASE       :	Any						    =							patch_size
       _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							num_channels
       _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							qkv_bias






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase__      ={
    '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:
       UpperCamelCase__      =[
           '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

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