

"""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										=		{
    "shi-labs/dinat-mini-in1k-224": "https://huggingface.co/shi-labs/dinat-mini-in1k-224/resolve/main/config.json",
    # See all Dinat models at https://huggingface.co/models?filter=dinat
}
class        _lowercase					(     __lowercase   , __lowercase     ):
     _lowerCamelCase     =       'dinat'

     _lowerCamelCase     =       {
         'num_attention_heads': 'num_heads',
         'num_hidden_layers': 'num_layers',
     }







     def __init__(      self ,						UpperCamelCase_=4 ,						UpperCamelCase_=3 ,						UpperCamelCase_=64 ,						UpperCamelCase_=[3, 4, 6, 5] ,						UpperCamelCase_=[2, 4, 8, 16] ,						UpperCamelCase_=7 ,						UpperCamelCase_=[[1, 8, 1], [1, 4, 1, 4], [1, 2, 1, 2, 1, 2], [1, 1, 1, 1, 1]] ,						UpperCamelCase_=3.0 ,						UpperCamelCase_=True ,						UpperCamelCase_=0.0 ,						UpperCamelCase_=0.0 ,						UpperCamelCase_=0.1 ,						UpperCamelCase_="gelu" ,						UpperCamelCase_=0.0_2 ,						UpperCamelCase_=1E-5 ,						UpperCamelCase_=0.0 ,						UpperCamelCase_=None ,						UpperCamelCase_=None ,						**UpperCamelCase_ ,						):
      super().__init__(**__A       )

      __magic_name__     =      patch_size
      __magic_name__     =      num_channels
      __magic_name__     =      embed_dim
      __magic_name__     =      depths
      __magic_name__     =      len(__A       )
      __magic_name__     =      num_heads
      __magic_name__     =      kernel_size
      __magic_name__     =      dilations
      __magic_name__     =      mlp_ratio
      __magic_name__     =      qkv_bias
      __magic_name__     =      hidden_dropout_prob
      __magic_name__     =      attention_probs_dropout_prob
      __magic_name__     =      drop_path_rate
      __magic_name__     =      hidden_act
      __magic_name__     =      layer_norm_eps
      __magic_name__     =      initializer_range
      # we set the hidden_size attribute in order to make Dinat work with VisionEncoderDecoderModel
      # this indicates the channel dimension after the last stage of the model
      __magic_name__     =      int(embed_dim * 2 ** (len(__A       ) - 1)       )
      __magic_name__     =      layer_scale_init_value
      __magic_name__     =      ['''stem'''] + [f'''stage{idx}''' for idx in range(1 ,						len(__A       ) + 1       )]
      __magic_name__   ,						__magic_name__     =      get_aligned_output_features_output_indices(
          out_features=__A ,						out_indices=__A ,						stage_names=self.stage_names       )




"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


__lowerCamelCase										=		{
    "configuration_m2m_100": ["M2M_100_PRETRAINED_CONFIG_ARCHIVE_MAP", "M2M100Config", "M2M100OnnxConfig"],
    "tokenization_m2m_100": ["M2M100Tokenizer"],
}


try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __lowerCamelCase										=		[
     "M2M_100_PRETRAINED_MODEL_ARCHIVE_LIST",
     "M2M100ForConditionalGeneration",
     "M2M100Model",
     "M2M100PreTrainedModel",
 ]


if TYPE_CHECKING:
 from .configuration_mam_aaa import M2M_100_PRETRAINED_CONFIG_ARCHIVE_MAP, MaMaaaConfig, MaMaaaOnnxConfig
 from .tokenization_mam_aaa import MaMaaaTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_mam_aaa import (
      M2M_100_PRETRAINED_MODEL_ARCHIVE_LIST,
      MaMaaaForConditionalGeneration,
      MaMaaaModel,
      MaMaaaPreTrainedModel,
  )


else:
 import sys

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

