





'''simple docstring'''


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


_SCREAMING_SNAKE_CASE	 =							logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE	 =							{
    '''microsoft/focalnet-tiny''': '''https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json''',
}

class    lowerCAmelCase_		(		UpperCAmelCase__						,UpperCAmelCase__		):
 __lowerCamelCase						:							Optional[int]         =					"focalnet"




 def __init__(	self			,     _lowerCAmelCase=224			,     _lowerCAmelCase=4			,     _lowerCAmelCase=3			,     _lowerCAmelCase=96			,     _lowerCAmelCase=False			,     _lowerCAmelCase=[192, 384, 768, 768]			,     _lowerCAmelCase=[2, 2, 6, 2]			,     _lowerCAmelCase=[2, 2, 2, 2]			,     _lowerCAmelCase=[3, 3, 3, 3]			,     _lowerCAmelCase="gelu"			,     _lowerCAmelCase=4.0			,     _lowerCAmelCase=0.0			,     _lowerCAmelCase=0.1			,     _lowerCAmelCase=False			,     _lowerCAmelCase=1E-4			,     _lowerCAmelCase=False			,     _lowerCAmelCase=False			,     _lowerCAmelCase=False			,     _lowerCAmelCase=0.02			,     _lowerCAmelCase=1E-5			,     _lowerCAmelCase=32			,     _lowerCAmelCase=None			,     _lowerCAmelCase=None			,     **_lowerCAmelCase			,     )    ->							List[str]:
     super().__init__(**__lowerCAmelCase		)

     _lowerCAmelCase				=      image_size
     _lowerCAmelCase				=      patch_size
     _lowerCAmelCase				=      num_channels
     _lowerCAmelCase				=      embed_dim
     _lowerCAmelCase				=      use_conv_embed
     _lowerCAmelCase				=      hidden_sizes
     _lowerCAmelCase				=      depths
     _lowerCAmelCase				=      focal_levels
     _lowerCAmelCase				=      focal_windows
     _lowerCAmelCase				=      hidden_act
     _lowerCAmelCase				=      mlp_ratio
     _lowerCAmelCase				=      hidden_dropout_prob
     _lowerCAmelCase				=      drop_path_rate
     _lowerCAmelCase				=      use_layerscale
     _lowerCAmelCase				=      layerscale_value
     _lowerCAmelCase				=      use_post_layernorm
     _lowerCAmelCase				=      use_post_layernorm_in_modulation
     _lowerCAmelCase				=      normalize_modulator
     _lowerCAmelCase				=      initializer_range
     _lowerCAmelCase				=      layer_norm_eps
     _lowerCAmelCase				=      encoder_stride
     _lowerCAmelCase				=      ["stem"] + [f'''stage{idx}''' for idx in range(1			,     len(self.depths		) + 1		)]
     _lowerCAmelCase			,			_lowerCAmelCase				=      get_aligned_output_features_output_indices(
         out_features=__lowerCAmelCase			,     out_indices=__lowerCAmelCase			,     stage_names=self.stage_names		)






'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_SCREAMING_SNAKE_CASE	 =							{
    "configuration_bigbird_pegasus": [
        "BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "BigBirdPegasusConfig",
        "BigBirdPegasusOnnxConfig",
    ],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       _SCREAMING_SNAKE_CASE	 =							[
           "BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST",
           "BigBirdPegasusForCausalLM",
           "BigBirdPegasusForConditionalGeneration",
           "BigBirdPegasusForQuestionAnswering",
           "BigBirdPegasusForSequenceClassification",
           "BigBirdPegasusModel",
           "BigBirdPegasusPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_bigbird_pegasus import (
           BIGBIRD_PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP,
           BigBirdPegasusConfig,
           BigBirdPegasusOnnxConfig,
       )

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_bigbird_pegasus import (
                  BIGBIRD_PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST,
                  BigBirdPegasusForCausalLM,
                  BigBirdPegasusForConditionalGeneration,
                  BigBirdPegasusForQuestionAnswering,
                  BigBirdPegasusForSequenceClassification,
                  BigBirdPegasusModel,
                  BigBirdPegasusPreTrainedModel,
              )


else:
       import sys

       _SCREAMING_SNAKE_CASE	 =							_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)


