




'''simple docstring'''





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


_SCREAMING_SNAKE_CASE							:       Union[str, Any]						=			logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE							:       List[str]						=			{
    "facebook/data2vec-vision-base-ft": (
        "https://huggingface.co/facebook/data2vec-vision-base-ft/resolve/main/config.json"
    ),
}




class 			_snake_case		(     __lowercase							):
			lowerCAmelCase_					:				str							=   "data2vec-vision"




			def __init__( self    ,							a__=768    ,							a__=12    ,							a__=12    ,							a__=3_072    ,							a__="gelu"    ,							a__=0.0    ,							a__=0.0    ,							a__=0.0_2    ,							a__=1e-12    ,							a__=224    ,							a__=16    ,							a__=3    ,							a__=False    ,							a__=False    ,							a__=False    ,							a__=False    ,							a__=0.1    ,							a__=0.1    ,							a__=True    ,							a__=[3, 5, 7, 11]    ,							a__=[1, 2, 3, 6]    ,							a__=True    ,							a__=0.4    ,							a__=256    ,							a__=1    ,							a__=False    ,							a__=255    ,							**a__    ,							)    ->    Optional[int]:

										'''simple docstring'''




										super().__init__(**snake_case_							)

										snake_case_      =				hidden_size
										snake_case_      =				num_hidden_layers
										snake_case_      =				num_attention_heads
										snake_case_      =				intermediate_size
										snake_case_      =				hidden_act
										snake_case_      =				hidden_dropout_prob
										snake_case_      =				attention_probs_dropout_prob
										snake_case_      =				initializer_range
										snake_case_      =				layer_norm_eps

										snake_case_      =				image_size
										snake_case_      =				patch_size
										snake_case_      =				num_channels
										snake_case_      =				use_mask_token
										snake_case_      =				use_absolute_position_embeddings
										snake_case_      =				use_relative_position_bias
										snake_case_      =				use_shared_relative_position_bias
										snake_case_      =				layer_scale_init_value
										snake_case_      =				drop_path_rate
										snake_case_      =				use_mean_pooling
										# decode head attributes (semantic segmentation)
										snake_case_      =				out_indices
										snake_case_      =				pool_scales
										# auxiliary head attributes (semantic segmentation)
										snake_case_      =				use_auxiliary_head
										snake_case_      =				auxiliary_loss_weight
										snake_case_      =				auxiliary_channels
										snake_case_      =				auxiliary_num_convs
										snake_case_      =				auxiliary_concat_input
										snake_case_      =				semantic_loss_ignore_index




class 			_snake_case		(     __lowercase							):
			lowerCAmelCase_					:				Optional[int]							=   version.parse("1.11"							)




			@property
			def        lowerCAmelCase__    ( self							)    ->    str:

										'''simple docstring'''




										return OrderedDict(
										    [
										        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
										    ]							)




			@property
			def        lowerCAmelCase__    ( self							)    ->    int:

										'''simple docstring'''




										return 1e-4










'''simple docstring'''





from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE							:       Optional[int]						=			{
    "configuration_canine": ["CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP", "CanineConfig"],
    "tokenization_canine": ["CanineTokenizer"],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_SCREAMING_SNAKE_CASE							:       Dict						=			[
		    "CANINE_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "CanineForMultipleChoice",
		    "CanineForQuestionAnswering",
		    "CanineForSequenceClassification",
		    "CanineForTokenClassification",
		    "CanineLayer",
		    "CanineModel",
		    "CaninePreTrainedModel",
		    "load_tf_weights_in_canine",
		]


if TYPE_CHECKING:
		from .configuration_canine import CANINE_PRETRAINED_CONFIG_ARCHIVE_MAP, CanineConfig
		from .tokenization_canine import CanineTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_canine import (
				    CANINE_PRETRAINED_MODEL_ARCHIVE_LIST,
				    CanineForMultipleChoice,
				    CanineForQuestionAnswering,
				    CanineForSequenceClassification,
				    CanineForTokenClassification,
				    CanineLayer,
				    CanineModel,
				    CaninePreTrainedModel,
				    load_tf_weights_in_canine,
				)


else:
		import sys

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




