





'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


_A:					List[Any]							=				{
    """configuration_mega""": ["""MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MegaConfig""", """MegaOnnxConfig"""],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _A:					List[Any]							=				[
        """MEGA_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """MegaForCausalLM""",
        """MegaForMaskedLM""",
        """MegaForMultipleChoice""",
        """MegaForQuestionAnswering""",
        """MegaForSequenceClassification""",
        """MegaForTokenClassification""",
        """MegaModel""",
        """MegaPreTrainedModel""",
    ]

if TYPE_CHECKING:
    from .configuration_mega import MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP, MegaConfig, MegaOnnxConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_mega import (
            MEGA_PRETRAINED_MODEL_ARCHIVE_LIST,
            MegaForCausalLM,
            MegaForMaskedLM,
            MegaForMultipleChoice,
            MegaForQuestionAnswering,
            MegaForSequenceClassification,
            MegaForTokenClassification,
            MegaModel,
            MegaPreTrainedModel,
        )

else:
    import sys

    _A:					Tuple							=				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)












'''simple docstring'''




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


_A:					Tuple							=				logging.get_logger(__name__)






class UpperCAmelCase							(		UpperCAmelCase_							):
    _A :			List[Any]						   =       """timm_backbone"""



    def __init__(  self     ,			__A=None     ,			__A=3     ,			__A=True     ,			__A=True     ,			__A=None     ,			**__A     ,			):
     super().__init__(**__A					)
     __UpperCAmelCase					=   backbone
     __UpperCAmelCase					=   num_channels
     __UpperCAmelCase					=   features_only
     __UpperCAmelCase					=   use_pretrained_backbone
     __UpperCAmelCase					=   True
     __UpperCAmelCase					=   out_indices if out_indices is not None else (-1,)





