



'''simple docstring'''




import warnings

from ...utils import logging
from .image_processing_layoutlmva import LayoutLMvaImageProcessor


UpperCamelCase__ :			Optional[Any]												=				logging.get_logger(__name__)






class 		_UpperCamelCase						(							__snake_case					):


			'''simple docstring'''

			def __init__(							self  :				Optional[Any]							,  *lowerCAmelCase__  :				List[str]							,  **lowerCAmelCase__  :				int		):





					"""simple docstring"""






					warnings.warn(
					    """The class LayoutLMv2FeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
					    """ Please use LayoutLMv2ImageProcessor instead."""							,  __UpperCamelCase							,  )
					super().__init__(*__UpperCamelCase							,  **__UpperCamelCase		)





'''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


UpperCamelCase__ :			Any												=				logging.get_logger(__name__)

UpperCamelCase__ :			Dict												=				{
    '''microsoft/beit-base-patch16-224-pt22k''': (
        '''https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json'''
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}






class 		_UpperCamelCase						(							lowerCamelCase__					):


			'''simple docstring'''

			_A   :	Optional[int]    					=	'''beit'''

			def __init__(							self  :				Tuple							,  lowerCAmelCase__  :				List[Any]=8_1_9_2							,  lowerCAmelCase__  :				List[Any]=7_6_8							,  lowerCAmelCase__  :				List[Any]=1_2							,  lowerCAmelCase__  :				Union[str, Any]=1_2							,  lowerCAmelCase__  :				Dict=3_0_7_2							,  lowerCAmelCase__  :				List[Any]="gelu"							,  lowerCAmelCase__  :				List[Any]=0.0							,  lowerCAmelCase__  :				int=0.0							,  lowerCAmelCase__  :				Tuple=0.02							,  lowerCAmelCase__  :				Any=1E-12							,  lowerCAmelCase__  :				Dict=2_2_4							,  lowerCAmelCase__  :				List[str]=1_6							,  lowerCAmelCase__  :				int=3							,  lowerCAmelCase__  :				Union[str, Any]=False							,  lowerCAmelCase__  :				Union[str, Any]=False							,  lowerCAmelCase__  :				Any=False							,  lowerCAmelCase__  :				Union[str, Any]=False							,  lowerCAmelCase__  :				Optional[int]=0.1							,  lowerCAmelCase__  :				Dict=0.1							,  lowerCAmelCase__  :				Tuple=True							,  lowerCAmelCase__  :				str=[3, 5, 7, 1_1]							,  lowerCAmelCase__  :				str=[1, 2, 3, 6]							,  lowerCAmelCase__  :				Dict=True							,  lowerCAmelCase__  :				Dict=0.4							,  lowerCAmelCase__  :				int=2_5_6							,  lowerCAmelCase__  :				Any=1							,  lowerCAmelCase__  :				str=False							,  lowerCAmelCase__  :				Union[str, Any]=2_5_5							,  **lowerCAmelCase__  :				Optional[int]							,  ):





					"""simple docstring"""






					super().__init__(**lowerCAmelCase__		)

					__SCREAMING_SNAKE_CASE :	int					 =	vocab_size
					__SCREAMING_SNAKE_CASE :	int					 =	hidden_size
					__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	num_hidden_layers
					__SCREAMING_SNAKE_CASE :	List[str]					 =	num_attention_heads
					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	intermediate_size
					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	hidden_act
					__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	hidden_dropout_prob
					__SCREAMING_SNAKE_CASE :	Any					 =	attention_probs_dropout_prob
					__SCREAMING_SNAKE_CASE :	Dict					 =	initializer_range
					__SCREAMING_SNAKE_CASE :	Any					 =	layer_norm_eps

					__SCREAMING_SNAKE_CASE :	Dict					 =	image_size
					__SCREAMING_SNAKE_CASE :	Optional[int]					 =	patch_size
					__SCREAMING_SNAKE_CASE :	int					 =	num_channels
					__SCREAMING_SNAKE_CASE :	Tuple					 =	use_mask_token
					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	use_absolute_position_embeddings
					__SCREAMING_SNAKE_CASE :	Optional[int]					 =	use_relative_position_bias
					__SCREAMING_SNAKE_CASE :	Optional[Any]					 =	use_shared_relative_position_bias
					__SCREAMING_SNAKE_CASE :	Optional[int]					 =	layer_scale_init_value
					__SCREAMING_SNAKE_CASE :	Any					 =	drop_path_rate
					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	use_mean_pooling
					# decode head attributes (semantic segmentation)
					__SCREAMING_SNAKE_CASE :	Any					 =	out_indices
					__SCREAMING_SNAKE_CASE :	List[Any]					 =	pool_scales
					# auxiliary head attributes (semantic segmentation)
					__SCREAMING_SNAKE_CASE :	List[Any]					 =	use_auxiliary_head
					__SCREAMING_SNAKE_CASE :	str					 =	auxiliary_loss_weight
					__SCREAMING_SNAKE_CASE :	Union[str, Any]					 =	auxiliary_channels
					__SCREAMING_SNAKE_CASE :	str					 =	auxiliary_num_convs
					__SCREAMING_SNAKE_CASE :	int					 =	auxiliary_concat_input
					__SCREAMING_SNAKE_CASE :	Dict					 =	semantic_loss_ignore_index






class 		_UpperCamelCase						(							lowerCamelCase__					):


			'''simple docstring'''

			_A   :	List[str]    					=	version.parse('''1.11'''					)

			@property
			def UpperCamelCase__      (							self  :				List[str]		):





					"""simple docstring"""






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



			@property
			def UpperCamelCase__      (							self  :				Any		):





					"""simple docstring"""






					return 1E-4